Skip to content

Commit

Permalink
Add defaultGroupRotate props
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Nov 28, 2019
1 parent 8ffb968 commit 8e7a29c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Moveable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,20 @@ class Moveable extends EgComponent implements MoveableInterface {
* moveable.baseDirection = [-1, -1];
*/

/**
* Sets the initial rotation of the group. (default 0)
* @name Moveable#defaultGroupRotate
* @example
* import Moveable from "moveable";
*
* const moveable = new Moveable(document.body, {
* target: [].slice.call(document.querySelectorAll(".target")),
* defaultGroupRotate: 0,
* });
*
* moveable.defaultGroupRotate = 40;
*/

/**
* Whether or not target can be scrolled to the scroll container (default: false)
* @name Moveable#scrollable
Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ import {
* @property - Target's base direcition using top, left, right, bottom (top: -1, left: -1, right: 1, bottom: 1) (default: [-1, -1])
* @property - You can specify the position of the rotation. (default: "top")
* @property - Set directions to show the control box. (default: ["n", "nw", "ne", "s", "se", "sw", "e", "w"])
* @property - Sets the initial rotation of the group. (default 0)
* @property - Whether or not target can be scrolled to the scroll container (default: false)
* @property - The container to which scroll is applied (default: container)
* @property - Expand the range of the scroll check area. (default: 0)
Expand Down Expand Up @@ -87,6 +90,8 @@ export interface MoveableOptions {
baseDirection?: number[];
renderDirections?: string[];

defaultGroupRotate?: boolean;

scrollable?: boolean;
scrollContainer?: HTMLElement;
scrollThreshold?: number;
Expand Down

0 comments on commit 8e7a29c

Please sign in to comment.