FEAT: how to resize start/end in absolute mode?
Question
Hello, dear
i'm trying something like "resize:start/end" in absoluteMode with styleable:change:width/height.
can you help me?
Answers (1)
this work:
editor.on("change:canvasOffset", (model) => {
var component = editor.getSelected();
if (!component) return;
var resizing = editor.Canvas.getBody().classList.contains("gjs-resizing");
if (resizing && !component.get("resizing")) {
component.set("resizing", 1);
console.log(component.get("type") + " resize start");
} else if (!resizing && !!component.get("resizing")) {
component.set("resizing", 0);
console.log(component.get("type") + " resize end");
// Actualizo el stylemanager
editor.trigger("component:toggled");
}
});
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3328
How can I update the nodeValue (text value) of components by inputs forms
Hello. Grapesjs is a great tool. Thanks for it. I want to update the text value of a component by inputs, how can I do that?? if a user fil...
Issue #3211
how to move components
Hello dear: I want move a component to first/end in the wrapper programmatically, i think something like editor.getWrapper().add(editor.sel...
Issue #1961
Some user return
Hello i try to use grapesjs like an enduser to builde a page some returns : how to select row to change width when we use column blocks ? i...
Issue #3200
Help needed: Get the component that a block being dropped onto?
Hello, If I drag and drop a block on a dynamically added component, how can I get/access the component that the block is dropped onto? I se...
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.