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
Allow to select bounding box independent from path item #769
Comments
That sounds like a bug, actually! |
@lehni Okay thanks. Do you have any recommendations regarding my second question? Whats the best strategy to draw a custom 'selector' for each item (e.g. for rotating and resizing an item with bigger segment handles)? |
@lehni Here is a snippet: svg = project.importSVG(
'<svg width="400" height="200" viewBox="0 0 1200 600" xmlns="http://www.w3.org/2000/svg" version="1.1"> ' +
'<title>Example quad01 - quadratic Bézier commands in path data</title>' +
'<desc>Picture showing a "Q" a "T" command, along with annotations showing the control points and end points</desc>' +
'<path id="my_curve" d="M200,300 Q400,50 600,300 T1000,300" fill="none" stroke="green" stroke-width="5" />' +
'<rect id="my_rect" x="1" y="1" width="1198" height="598" fill="none" stroke="blue" stroke-width="2" />' +
'</svg>'
)
svg.bounds.selected = true |
There is http://paperjs.org/reference/paperscope/#settings And the possibility to customize selection style was already requested here #433 |
@lehni Thanks. About the issue setting bound/path selection independently: I had a look at the source code and found the |
I think here is the source of the issue: paper.js/src/basic/Rectangle.js Line 918 in 4e2fba6
I need this feature to only set the bounds of an item (svg item) to be selected. Selecting all segements of an complex SVG item looks just terrible :) My current workaround is to set |
Yes I have a pretty clear picture what's off, but the code needs some changing to separate selection of items from selection of bounds. I haven't had the time yet to look into it next to all the other ongoing issues... |
@kaelumania this required quite a bit of refactoring to implement properly. Please test and let me know how it works for you! |
…election from item and bounds." This reverts commit f0edcd3. # Conflicts: # src/path/Segment.js
Is it possible to select only the bounding box and not the path itsself. It seems setting
item.bounds.selected = true
select all path segments etc. (as also stated in the documentation).Or what is the best solution to draw a custom selection rectangle? With custom handles etc.
The text was updated successfully, but these errors were encountered: