Skip to content
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

Button to switch designer mode #2630

Closed
micker opened this issue Mar 9, 2020 · 10 comments
Closed

Button to switch designer mode #2630

micker opened this issue Mar 9, 2020 · 10 comments

Comments

@micker
Copy link

micker commented Mar 9, 2020

hello
its possible to add a button to switch of designer mode ? absolute / translate ?
regards

@pouyamiralayi
Copy link

@micker you need a command for that which executes: editor.setDragMode('absolute'). for panels & buttons you can refer to getting started guide.
Cheers!

@micker
Copy link
Author

micker commented Mar 9, 2020

hi thanks
did you think it possible to mix twice mode for more ? are its too early ?
because when i test i can put text inside a column for exemple ... it will be good to use absolute position in column and put yexy block inside it to move column like a group

@pouyamiralayi
Copy link

@micker yes! you can do it per component: #1936 comment
Cheers!

@micker
Copy link
Author

micker commented Mar 9, 2020

i see the demo of bubble .. its realy cool can you explain more how to acheive same things ?

@pouyamiralayi
Copy link

@micker can you explain what specific feature you are interested in bubble that you want to achieve in grapesjs?

@micker
Copy link
Author

micker commented Mar 9, 2020

i didn't understand how tomix absolute and standar mode to use like this :

  • 1 create a column (rezizable and absolute)
  • 1 create a block text and mode inside column (block will be absolute inside the column)
    result column can be "movable" with text block inside
    thanks for your prompt support

@pouyamiralayi
Copy link

@micker

create a column (rezizable and absolute)

i don't think if it is possible to have both modes at the same time for a particular component.

you can change the mode constantly by checking the component type at component:selected event to see if it is a text block and check the parent, so in case the parent is the desired column, change it's mode to absolute!
Cheers!

@micker
Copy link
Author

micker commented Mar 9, 2020

ok maybe a switcher mode can be in basic panel ?

@artf
Copy link
Member

artf commented Mar 9, 2020

@micker GrapesJS becomes more API oriented and less UI dependent, so you should create buttons/panels/switches on your own.
Maybe in the future I'll add the UI module in the core (to help building the UI using GrapesJS elements) but it's just an idea, still far from being achieved

@artf artf closed this as completed Mar 9, 2020
@micker
Copy link
Author

micker commented Mar 10, 2020

cool thanks !
you explain : data-gjs-resizable
that exist with dragmode ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants