Resize blocks with mouse?
Question
I noticed that in the current demo it is only possible to resize most blocks using the property editor, not by dragging anchors on the block (which is possible with the map element for example). Is this by design or is it simply a feature that has not been implemented yet?
Answers (3)
Hi @matthewgertner,
I believe this is can be enabled on individual components via the "resizable" property: component.set("resizable", true). It's probably not going to work very well on elements having a display: inline style (a <span> for example), or elements where the height/width is set by % instead of pixels.
This is probably not the best way to enable this, but you could do something like this to see it in action: editor.on("component:selected", function(args) { args[1].set("resizable", true); });
@matthewgertner Ryan's solution should work, and, yes, I do not apply them by design for reasons already explained by Ryan but you can actually create blocks/components with resizable enabled
@ryandeba @artf Great, thanks for the suggestion. We're playing with the codebase now so we'll give that a try.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2061
[QUESTION] How to place a component at the end of the canvas.
How can I put my footer at the end of the canvas? I want the editor to not allow placing a block/widget below the footer. example
Issue #792
Script property using function don't work with blocks
In Components & JS docs there's this example: This works perfectly. But I couldn't use a function instead of a string in script, as is said...
Issue #1683
How to change id/class when new element drop on editor or render element with dynamic ip?
Hello @artf , Hope you are doing well. I have two questions regards dynamic blocks adding, 1) Is it possible to render the block with dynam...
Issue #994
how to make sure block is dropped only at the top level
For example I have two blocks A and B that I want to drop to the editor canvas. But sometimes the block that dropped later become the child...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.