Issue #3453Opened May 12, 2021by alemenciones0 reactions

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)

alemencionesMay 14, 20210 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.