@@ -21,6 +21,9 @@ angular2-draggable has angular (ver >= 4.x) directives that make the DOM element
2121+ ` ngResizable `
2222
2323# Latest Update
24+ + 2018.06.27: 2.0.0-beta.2
25+ + ngResizable: Provide ` [rzAspectRatio] ` , whether the element should be constrained to a specific aspect ratio.
26+
2427+ 2018.06.26: 2.0.0-beta.1
2528 + ngResizable: Provide ` (rzStart) ` , ` (rzResizing) ` , ` (rzStop) ` event emitters
2629 + ngResizable: Provide ` resetSize() ` , ` getStatus() ` methods
@@ -137,22 +140,23 @@ Well you can use both directives concurrently if you wish:
137140
138141 | Input | Type | Default | Description |
139142 | ---- - | ---- | ------ - | ---------- - |
140- | ` ngDraggable ` | boolean | ` true ` | You can toggle the draggable capability by setting ` true ` or ` false ` |
141- | ` handle ` | HTMLElement | null | Use template variable to refer to the handle element . Then only the handle element is draggable |
142- | ` zIndex ` | string | null | Use it to set z - index property when element is not moving |
143- | ` zIndexMoving ` | string | null | Use it to set z - index property when element is moving |
144- | ` bounds ` | HTMLElemnt | null | Use it to set the boundary |
145- | ` inBounds ` | boolean | ` false ` | Use it make element stay in the bounds |
146- | ` outOfBounds ` | ` { top: boolean; bottom: boolean; right: boolean; left: boolean } ` | ` false ` | Set it to allow element get out of bounds from the direction . Refer to [demo ](https :// xieziyu.github.io/angular2-draggable/#/usage/boundary) |
147- | ` position ` | ` { x: number, y: number } ` | ` { x:0, y:0 } ` | Use it to set position offset |
148- | ` gridSize ` | number | 1 | Use it for snapping to grid . Refer to [demo ](https :// xieziyu.github.io/angular2-draggable/#/advance/snap-grid) |
143+ | ngDraggable | boolean | ` true ` | You can toggle the draggable capability by setting ` true ` or ` false ` |
144+ | handle | HTMLElement | null | Use template variable to refer to the handle element . Then only the handle element is draggable |
145+ | zIndex | string | null | Use it to set z - index property when element is not moving |
146+ | zIndexMoving | string | null | Use it to set z - index property when element is moving |
147+ | bounds | HTMLElemnt | null | Use it to set the boundary |
148+ | inBounds | boolean | ` false ` | Use it make element stay in the bounds |
149+ | outOfBounds | ` { top: boolean; bottom: boolean; right: boolean; left: boolean } ` | ` false ` | Set it to allow element get out of bounds from the direction . Refer to [demo ](https :// xieziyu.github.io/angular2-draggable/#/usage/boundary) |
150+ | position | ` { x: number, y: number } ` | ` { x:0, y:0 } ` | Use it to set position offset |
151+ | gridSize | number | 1 | Use it for snapping to grid . Refer to [demo ](https :// xieziyu.github.io/angular2-draggable/#/advance/snap-grid) |
149152
150153+ ` ngResizable ` directive support following input porperties :
151154
152155 | Input | Type | Default | Description |
153156 | ---- - | ---- | ------ - | ---------- - |
154- | ` ngResizable ` | boolean | ` true ` | You can toggle the resizable capability by setting ` true ` or ` false ` |
155- | ` rzHandles ` | string | ` "e,s,se" ` | Which handles can be used for resizing . Optional types in ` "n,e,s,w,se,sw,ne,nw" ` or ` "all" ` |
157+ | ngResizable | boolean | ` true ` | You can toggle the resizable capability by setting ` true ` or ` false ` |
158+ | rzHandles | string | ` "e,s,se" ` | Which handles can be used for resizing . Optional types in ` "n,e,s,w,se,sw,ne,nw" ` or ` "all" ` |
159+ | rzAspectRatio | boolean \| number | false | ` boolean ` : Whether the element should be constrained to a specific aspect ratio . ` number ` : Force the element to maintain a specific aspect ratio during resizing (width / height ) |
156160
157161## CSS :
158162+ When ` ngDraggable ` is enabled on some element , ` ng-draggable ` class is automatically assigned to it . You can use it to customize the pointer style . For example :
@@ -170,11 +174,11 @@ Well you can use both directives concurrently if you wish:
170174
171175 | Output | $event | Description |
172176 | ------ | ------ | ----------- |
173- | ` started ` | ` nativeElement ` of host | emitted when start dragging |
174- | ` stopped ` | ` nativeElement ` of host | emitted when stop dragging |
175- | ` edge ` | { top: boolean, right: boolean, bottom: boolean, left: boolean } | emitted after ` [bounds ]` is set |
176- | ` movingOffset ` | { x: number, y: number } | emit position offset when moving |
177- | ` endOffset ` | { x: number, y: number } | emit position offset when stop moving |
177+ | started | ` nativeElement ` of host | emitted when start dragging |
178+ | stopped | ` nativeElement ` of host | emitted when stop dragging |
179+ | edge | { top: boolean, right: boolean, bottom: boolean, left: boolean } | emitted after ` [bounds ]` is set |
180+ | movingOffset | { x: number, y: number } | emit position offset when moving |
181+ | endOffset | { x: number, y: number } | emit position offset when stop moving |
178182
179183 Simple example:
180184 ` ` ` html
@@ -191,9 +195,9 @@ Well you can use both directives concurrently if you wish:
191195
192196 | Output | $event | description |
193197 | ------ | ------ | ----------- |
194- | ` rzStart ` | ` IResizeEvent ` | emitted when start resizing |
195- | ` rzResizing ` | ` IResizeEvent ` | emitted when stop resizing |
196- | ` rzStop ` | ` IResizeEvent ` | emitted when resizing |
198+ | rzStart | ` IResizeEvent ` | emitted when start resizing |
199+ | rzResizing | ` IResizeEvent ` | emitted when stop resizing |
200+ | rzStop | ` IResizeEvent ` | emitted when resizing |
197201
198202 ` ` ` typescript
199203 export interface IResizeEvent {
0 commit comments