E
E
ebanytiu_lis2018-06-18 11:38:49
Angular
ebanytiu_lis, 2018-06-18 11:38:49

Windows that can be moved in Angular?

Good day!
I sat down at the angular, I'm trying to make a window that can be moved by its title.
Window layout:

<div class='windows'>
  <div id='title'>Title</div>
  <div id='content'>Content</div>
</div>

I added the draggeble module from here: stackblitz.com/edit/draggable-part-3
So that's it... If I add the appMovable attribute to the main div, the window moves completely when you click in any of its areas. And I need it to move only when the window title is clicked.
Is there any way to make the entire window move when clicking #title?
PS There can be many windows on the page

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Eremin, 2018-06-18
@EreminD

so, what about onmousedown/onmouseup events to add/remove the draggable class to the entire window?
or even hover over title (onmouseover/onmouseout)
https://www.w3schools.com/js/tryit.asp?filename=tr...
https://www.w3schools.com/js/tryit.asp?filename =tr...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question