Interactivity Outside of the JSX Board

81 views
Skip to first unread message

Henrik Staaf

unread,
Jul 19, 2021, 12:18:32 PM7/19/21
to JSXGraph
Hi,

I have a question about interactivity.

When I drag a point in JSXgraph, the point is no longer active when I go outside of the JSX Container. Is it possible to keep interacting with the point if I have not released the mouse button but I am outside of the JSX container? 

Sincerely,

Henrik

Alfred Wassermann

unread,
Jul 20, 2021, 5:34:25 AM7/20/21
to JSXGraph
This is an interesting suggestion. There is a quick hack how to force it. Just add the event listener  for 'move' to
the whole document (meanwhile "pointer" events should be sufficient) after initialising the board:

    var board = JXG.JSXGraph.initBoard('jxgbox', {
        boundingbox: [-5,5,5,-5],
        axis: true,
    });
    JXG.addEvent(document, 'pointermove', board.pointerMoveListener, board);

Actually, I can imagine that this could be set as default. Is anybody aware of any disadvantages?
Best wishes,
Alfred




Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Alfred Wassermann

unread,
Jul 24, 2021, 10:26:31 AM7/24/21
to JSXGraph
Unfortunately, some very valuable posts have been blocked by the spam filter of Google. I tried to unblock them and received them as emails but it seems that they are not displayed in the discussion threads. To summarize the discussion:
  • Pro: Interactivity outside of the board is very helpful - especially on mobile devices
  • Con: Points are more or less lost if there is an up event outside of the board.
If interactivity is restricted to sliders, the losing of points can not happen, so it makes perfect sense to offer interactivity outside of the board as options. However, because of the possible problems, I intend not to set it as default.

Do you all agree?

Best wishes,
Alfred

Henrik

unread,
Jul 24, 2021, 10:28:28 AM7/24/21
to jsxg...@googlegroups.com
Could we have an automatic restriction that is the same width and height as the board. That way we can havr the best of both worlds 

--
You received this message because you are subscribed to a topic in the Google Groups "JSXGraph" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsxgraph/EFB62B2j3_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsxgraph+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsxgraph/e397a14f-b8f4-4b2e-81ea-5a8190442b8fn%40googlegroups.com.

Alfred Wassermann

unread,
Jul 24, 2021, 10:47:56 AM7/24/21
to JSXGraph
The 1.2.4 dev branch meanwhile contains the suggestion by Murray Bourne at the 1. JSXGraph conference:

One can supply e.g. max-width: 100% and give an aspect-ratio for the board. Then the new version will automatically resize on orientation change or other size changes.
I hope, we can release the next version in the next two weeks.

Best wishes,
Alfred

Murray

unread,
Jul 25, 2021, 5:58:13 PM7/25/21
to JSXGraph
Alfred

I also received the deleted messages as emails, but I notice they still appear as "deleted" here on Google Groups. Can't see anything spam-like in any of my messages.

I agree that restricting such interactivity to sliders is less dangerous, but it's still possible novice users will inadvertently click on a slider extremity, thus causing elements to disappear. They may not even realise what they did to cause this situation and believe that they caused an error and will give up.

So I agree it shouldn't be set as default and while in some situations it may make interactivity easier, I remain not a fan.

Regards
Murray
Reply all
Reply to author
Forward
0 new messages