givanz / VvvebJs

Drag and drop page builder library written in vanilla javascript without dependencies or build tools.
https://www.vvveb.com/vvvebjs/editor.html
Apache License 2.0
7.07k stars 1.62k forks source link

how to make all elements resizable in vvvebjs be default #236

Open ddfdfhh opened 2 years ago

givanz commented 2 years ago

Hi

Resizable elements have resizable set to true, for example image component https://github.com/givanz/VvvebJs/blob/master/libs/builder/components-html.js#L84-L84

You can add the attribute to your components or edit https://github.com/givanz/VvvebJs/blob/master/libs/builder/builder.js#L1321 and change

    if (Vvveb.component.resizable) {
        $("#select-box").addClass("resizable");
    } else {
        $("#select-box").removeClass("resizable");
    }

to

    $("#select-box").addClass("resizable");