# Examples
# Vue Custom Directive v-window
Basic Example
Contain three feature: drag, resize, maximize.
WARNING
<iframe />
will swallow the touch/mouse event, include touchmove
and mousemove
which are dependent by drag and resize feature. Therefor, when mouse/finger move into the <iframe />
area, there will be no any response for drag/resize. Fortunatly, I have already considered this situation and finally fix it, so you won't be conserned.
# Javascript Class Library Basic Example
# Disable Drag and Enable Part of Resize
# Pass Drag Handler Parameter
In this example,you could move the window only when you drag the Drag Handler(.window_header
), which is the header of the window.
# Only Vertical Drag Available
When set movable
to 'vertical'
, users will be only allow to make vertical drag; for the same reason, 'horizontal'
means only allow horizontal drag.
# Avoid Unexpected Click Event Inside Window During Drag Window
When you have not provided param customMoveHandler
, users are able to drag&move the window through any position inside the window. Though this may poses a problem: in case user drag&move the window through a button in the window, this button's CLICK event will be triggered when drag&move finish, and this is not we expedted generally.
Therefore, vue-directive-window provide hooks related to drag&move,and you should add LOCK to avaoid the unexpected CLICK event triggered by drag&move. Here is an example: