-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
hit detection position/pivot selection versus center selection #1249
Comments
i also have a sort of quick fix if one can integrate it in bold/italic https://github.com/paperjs/paper.js/blob/da52f1f6850fbd820cc3c70b4609f4cb639861f2/src/item/Item.js if (checkSelf && (options.pivot || options.center || options.bounds) && this._parent) { |
or if one inverts the return order pivot on top of center if (checkSelf && (options.pivot || options.center || options.bounds) && this._parent) { |
or a better option to check for position instead of pivot , there is also the HitResult definitiof file that needs to be updated with a default value if one wants to be complete // Hit test the pivot/position of the bounds if (checkSelf && (options.position || options.center || options.bounds) && this._parent) { |
Could you provide a simple demo script that demonstrates the problem, e.g. on http://sketch.paperjs.org/? Thanks! |
Hi Lehni,I provided a script for this issue in Github.Best regards, Dan.
From: Jürg Lehni <notifications@github.com>
To: paperjs/paper.js <paper.js@noreply.github.com>
Cc: dexterial <bdan_ro@yahoo.com>; Author <author@noreply.github.com>
Sent: Wednesday, March 8, 2017 4:25 PM
Subject: Re: [paperjs/paper.js] hit detection position/pivot selection versus center selection (#1249)
Could you provide a simple demo script that demonstrates the problem, e.g. on http://sketch.paperjs.org/? Thanks!—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Great, thanks! Trip: If you use |
Ok, I understand the issue now. I agree that adding the |
as per issue #980 this should be resolved, however the position.selected = true actually triggers a call to getCenter, that attaches itself to bounds.getCenter. All is nice and fine unless you have an uneven shape, in that case, after rotation the 2 points do not coincide anymore, ergo the hit test does not give you the actual position/pivot, but the bounds center.
The text was updated successfully, but these errors were encountered: