-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Objects resize/scale controls to be always on top #22
Comments
Not possible right now, but an interesting (and useful) idea. I'll try tackling it. |
Now implemented via "controlsAboveOverlay" canvas property. |
Is it expected that controls are visible, the object behind the object on top is scalable/rotatable but not draggable? |
@MARTINB83 if the draggable area is overlayed by another object then it's not draggable. We don't have controls for dragging so controls behavior won't help in such case. |
Yep I noticed. My challenge though is to have image1 overlayed by image2. Image1 should still be draggable and scaleable behind image2 which should behave like an overlay. However, using setOverlayImage in my usecase is not suitable since I want to also add text on top of the overlay image (I have created a label designer using transparent image templates). Bit stuck here and implemented key events as a fallback (using up-down-left-right keys to move image1). |
martin, try to compose on a separate canvas the text and the image, then use that canvas as source for your overlay image. i saw someone doing this to create dynamic patterns somewhere in some issue here on github. i cannot assist you with code, but should be doable. |
@kangax We don't have controls for dragging, but what about making whole border draggable on top to move object from background? Is that possible? I think it could behave same as resize controls... |
Oh sorry... i see it's possible to use |
Is there already any solution for such cases? |
This is very old, many things changed. What about using an overlay image? |
Yes it's old but wasn'T about to start an extra ticket. |
An overlay image can be any object, there is no limit you can do a rect and set it as overlayImage on the canvas instance. |
http://fabricjs.com/docs/fabric.StaticCanvas.html#setOverlayImage |
Nevermind, just tried by passing my rectangle and yes it seems to work. Thanks alot. |
**0.4.0** New Features and fixes - Fixes -- Upgraded to latest packages (thanks @fjogeleit) -- Fix for undo/redo (thanks @pomelyu) -- Issue fabricjs#9 fixed -- Issue fabricjs#10 and fabricjs#15 you can no longer give dataUrl as value only as background image and/or by adding the image as an object - Breaking Changes -- `data` and `dataType` properties have been replaced with `value` and `defaultValue` to be able to use the component as controlled component -- node support of 6,7 and 8 - New Features -- ability to add an image as object
Would it be possible to have the border with controls on an active object always on top (maybe in a new canvas above the one with objects)?
Say for example that you have a list of all the objects in the canvas in a sidebar where you can select objects to bring forward, delete, send backward etc. From this list, you select an object that gets activated in the canvas. The controls for resize, scale and rotate shows up around the object, but the object is behind another object and therefor the only thing that will happen is that you will select the object in front of the one you want to control.
Maybe it's already possible to have the controls above all objects in the canvas? I have missed stuff in the docs before, haha :)
The text was updated successfully, but these errors were encountered: