-
Notifications
You must be signed in to change notification settings - Fork 296
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
MouseMove event prevents onClick handler from firing #142
base: master
Are you sure you want to change the base?
Changes from all commits
f12f67c
35e3219
f95e85f
313609b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1268,6 +1268,10 @@ $jit.ST.Label.DOM = new Class({ | |
sy = canvas.scaleOffsetY, | ||
posx = pos.x * sx + ox, | ||
posy = pos.y * sy + oy; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When using HTML labels and zooming in/out of the Spacetree the label positioning becomes erratic. Current label positioning calculations use the original node width/height unscaled which seemed to be the cause. Scaling the width/height fixed this for me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another issue with HTML labels is that the size of the label doesn't scale at all with zooming, though I'm able to account for this within the onPlaceLabel hook. |
||
// Scale node width/height | ||
w = w * sx; | ||
h = h * sy; | ||
|
||
if(dim.align == "center") { | ||
labelPos= { | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you removing the merge operation? The idea is to clone the object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my application I'm adding Ember.js objects to my the data hash. Ember objects have observer functions tied to data properties that will get fired when a property is modified. The merge operation copies the data but in doing so unsets the observers.
In my case I don't want to have a clone of the object in this hash, I want the object itself so that the object state remains consistent within the application. I hadn't intended for this change to be a part of the pull request, but why does the object need to be cloned in the first place?