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

I would like to ask how to solve the block component is not padding difficult to drag into the screen? #113

Closed
jay0319 opened this issue Jun 21, 2017 · 12 comments

Comments

@jay0319
Copy link

jay0319 commented Jun 21, 2017

I think of a practice is to insert a block after each time will add a plus button to facilitate the addition of a section But this must be reset block manager to solve this problem.

Thank you @artf.

@artf
Copy link
Member

artf commented Jun 21, 2017

Sorry @jay0319 but I don't get what is your issue. Can you elaborate the question?

@jay0319
Copy link
Author

jay0319 commented Jun 22, 2017

like this, this easy drag to canvas because section have padding.

1498104551469

But this not easy drag to canvas, because between section have not padding.

1498104825820

Sorry my english not very well, so I use img, hope you can understand my question thanks @artf .

@artf
Copy link
Member

artf commented Jun 22, 2017

Thanks @jay0319 now I got what do you mean and this is something I'm still working on.

At the moment you can tell a model what elements are acceptable and where they could be dragged, eg. example with a row/cell elements:

<div class="row" data-gjs-droppable=".row-cell">
  <div class="row-cell" data-gjs-draggable=".row"></div>
  <div class="row-cell" data-gjs-draggable=".row"></div>
</div>

But this double opt-in process is only executed once the component is dropped, I think moving this process up in dragging event might solve some of the issues.

I'll add this to the Roadmap

@artf artf mentioned this issue Jun 22, 2017
32 tasks
@jay0319
Copy link
Author

jay0319 commented Jun 23, 2017

Sorry @artf, I try this solution but not work, there are my code.
data-gjs-draggable, data-gjs-droppable <-- this will remove on drag to canvas is correct?

bm.add('Banner2col', { category: 'Section', label: 'Banner2col', attributes: { class: 'gjs-fonts gjs-f-b1' }, content: '<div class="banner2col row" data-gjs-droppable=".row-cell" data-gjs-custom-name="Row">' + '<div class="banner2col__grid row-cell" data-gjs-draggable=".row">' + '<div class="banner2col__cover">' + '</div>' + '</div>' + '<div class="banner2col__grid row-cell" data-gjs-draggable=".row">' + '<div class="banner2col__cover">' + '</div>' + '</div>' + '</div>' });

@jay0319
Copy link
Author

jay0319 commented Jun 29, 2017

Sorry @artf I want ask this function being built? Thank you.

@artf
Copy link
Member

artf commented Jun 29, 2017

@jay0319 can you elaborate better what is doesn't work with the current model properties? What do you do and what do you expect to happen?

@jay0319
Copy link
Author

jay0319 commented Jun 30, 2017

@artf I used you support method to test drag to between two no padding component, I has upgrated new version, thats show a orange outline can limit drag but still can't insert between two component, thank you.

@artf
Copy link
Member

artf commented Jun 30, 2017

I think you should wait for the improvement I've explained before because with droppable/draggable properties you can limit stuff but it's not gonna fix you problem with adjacent components. The orange outline just helps understand which is the parent but nothing more

@jay0319
Copy link
Author

jay0319 commented Jul 3, 2017

@artf Ok, I know thank you for your reply.

@artf
Copy link
Member

artf commented Jul 3, 2017

Hi @jay0319 I implemented the behavior explained before. I'd suggest you trying the demo with new column components (be sure to clean the cache/localStorage). You might notice how you aren't able to drag rows between cells and it should be easier drag rows around adjacent components.

@artf artf closed this as completed Jul 3, 2017
@jay0319
Copy link
Author

jay0319 commented Jul 4, 2017

Thanks @artf I will try the new version, thank you very much.

@lock
Copy link

lock bot commented Sep 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label Sep 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants