Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse click on an object doesn't set the input variable of that object #11

Open
triessner opened this issue Dec 29, 2020 · 9 comments
Open
Labels
bug Something isn't working

Comments

@triessner
Copy link

In my visualisation I (mis)use objects (ellipse, rectangle) as buttons. I.e. the ellipse of my pump: Clicking on it, sets a variable to start/stop the pump. I set the variable in the tab mode (German "Variable tasten"). In the java visualisation it works without problems, but not in this javascript visualisation.

@tnentwig
Copy link
Owner

So you have attached an tap event on the surrounding ellipse on the pump?

@triessner
Copy link
Author

I just noticed, that the tap works, when I click in the left half of the pump. It seams, that if I click in the area between the polyline it doesn't work. In the original java version it worked also in this area. I guess if I put the polyline below the ellipse (at the moment it is above the ellipse), it will work in the whole area of the ellipse. I will try in the next days and report again here.

@tnentwig tnentwig added the bug Something isn't working label Dec 30, 2020
@tnentwig
Copy link
Owner

tnentwig commented Dec 30, 2020

Yeah, I know this problem. The events are currently attached at the element itself e.g. the polyline but not the inner space.

@triessner
Copy link
Author

As expected, it works without problems when I put the polyline below the ellipse. But I will put it over the ellipse and test, when you address this bug.
It seams, that it is a similar problem as the very first issue I reported (Polylines draw triangles in the angles). I suppose the triangles aren't visible any more, but are still receiving the mouse click.

@Ekristoffe
Copy link
Collaborator

Ekristoffe commented Jan 8, 2021

I see. I will try something.
Edit: Ok i have found the right way to do this, dev repo updated.

@triessner
Copy link
Author

triessner commented Jan 29, 2021

I've tested the new release 1.0.13-3, and there it still doesn't work. Maybe your fix didn't find its way to the new version?
Now, with the cursor showing when it is over a clickable item, it is quite obvious: When the cursor moves over the (invisible) triangle of a polyline, it changes its form and indicates, that there is no clickable item below it.

@tnentwig
Copy link
Owner

I think this could be fixed by usage of "pointer-event: visible" only on visible elements and otherwise "pointer-event: none" at the surrounding div. Was this your attempt too, Chris?

@Ekristoffe
Copy link
Collaborator

Normally yeas but I have found some strange thing with the pointer event system.
I am thinking to check and redo the object.
I will have a big restructuration idea but It take time (every object need to be checked one by one and remake)

@tnentwig
Copy link
Owner

I think a quick fix woul be to set the pointer-events to "all". Would roughly correspond to the codesys visualization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants