import ResizeMirror from '@shopify/draggable/src/Plugins/ResizeMirror/ResizeMirror.js'
ResizeMirror
Extends:
The ResizeMirror plugin resizes the mirror element to the dimensions of the draggable element that the mirror is hovering over
Constructor Summary
Public Constructor | ||
public |
constructor(draggable: Draggable) ResizeMirror constructor. |
Member Summary
Public Members | ||
public |
ResizeMirror remembers the last height when resizing the mirror to avoid additional writes to the DOM |
|
public |
ResizeMirror remembers the last width when resizing the mirror to avoid additional writes to the DOM |
|
public |
mirror: * Keeps track of the mirror element |
|
public |
ResizeMirror options |
Method Summary
Public Methods | ||
public |
attach() Attaches plugins event listeners |
|
public |
detach() Detaches plugins event listeners |
|
public |
getOptions(): Object Returns options passed through draggable |
Private Methods | ||
private |
[onDragOver](dragEvent: DragOverEvent | DragOverContainer) Drag over handler |
|
private |
[onMirrorCreated](mirrorEvent: MirrorCreatedEvent) Mirror created handler |
|
private |
[onMirrorDestroy](mirrorEvent: MirrorDestroyEvent) Mirror destroy handler |
|
private |
[resize](dragEvent: DragOverEvent | DragOverContainer) Resize function for |
Public Constructors
Public Members
public lastHeight: number source
ResizeMirror remembers the last height when resizing the mirror to avoid additional writes to the DOM
Properties:
Name | Type | Attribute | Description |
lastHeight | number |
public lastWidth: number source
ResizeMirror remembers the last width when resizing the mirror to avoid additional writes to the DOM
Properties:
Name | Type | Attribute | Description |
lastWidth | number |
public mirror: * source
Keeps track of the mirror element
Properties:
Name | Type | Attribute | Description |
mirror | HTMLElement |
Public Methods
Private Methods
private [onDragOver](dragEvent: DragOverEvent | DragOverContainer) source
Drag over handler
Params:
Name | Type | Attribute | Description |
dragEvent | DragOverEvent | DragOverContainer |
private [onMirrorCreated](mirrorEvent: MirrorCreatedEvent) source
Mirror created handler
Params:
Name | Type | Attribute | Description |
mirrorEvent | MirrorCreatedEvent |
private [onMirrorDestroy](mirrorEvent: MirrorDestroyEvent) source
Mirror destroy handler
Params:
Name | Type | Attribute | Description |
mirrorEvent | MirrorDestroyEvent |
private [resize](dragEvent: DragOverEvent | DragOverContainer) source
Resize function for
Params:
Name | Type | Attribute | Description |
dragEvent | DragOverEvent | DragOverContainer |