Skip to content

Commit

Permalink
Merge pull request #69 from nichollascarter/staging
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
nichollascarter authored Jul 4, 2022
2 parents bee7f57 + e7cbdc7 commit d7ed3ac
Show file tree
Hide file tree
Showing 20 changed files with 3,067 additions and 1,512 deletions.
2 changes: 1 addition & 1 deletion .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
}
}],
["@semantic-release/git", {
"assets": ["dist/", "package.json", "CHANGELOG.md"],
"assets": ["dist/", "package.json", "CHANGELOG.md", "package-lock.json"],
"message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
}]
],
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# [1.1.0-rc.4](https://github.com/nichollascarter/subjx/compare/v1.1.0-rc.3...v1.1.0-rc.4) (2022-03-21)


### Bug Fixes

* **core:** fixed tests ([5d81abe](https://github.com/nichollascarter/subjx/commit/5d81abe94f745b25d4d539d081bcd14a9870003a))
* **core:** set correct transform origin, allow alignment for groupable html elements ([cf29d29](https://github.com/nichollascarter/subjx/commit/cf29d2910cbea89c83864b98d382cbfdda535531))

# [1.1.0-rc.3](https://github.com/nichollascarter/subjx/compare/v1.1.0-rc.2...v1.1.0-rc.3) (2022-03-02)


### Bug Fixes

* **src:** fixed undefined containerMatrix value on applying alignment ([6b20349](https://github.com/nichollascarter/subjx/commit/6b20349b3ca408297d923f64646bc69ac860245c))

# [1.1.0-rc.2](https://github.com/nichollascarter/subjx/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2022-02-14)


### Bug Fixes

* fix wrong transform-origin position for nested elements ([93af678](https://github.com/nichollascarter/subjx/commit/93af67887834b0c455ab8cbb38b8d7a7765d9ae5))

# [1.1.0-rc.2](https://github.com/nichollascarter/subjx/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2022-02-14)


### Bug Fixes

* fix wrong transform-origin position for nested elements ([93af678](https://github.com/nichollascarter/subjx/commit/93af67887834b0c455ab8cbb38b8d7a7765d9ae5))

# [1.1.0-rc.2](https://github.com/nichollascarter/subjx/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2022-02-14)


### Bug Fixes

* fix wrong transform-origin position for nested elements ([93af678](https://github.com/nichollascarter/subjx/commit/93af67887834b0c455ab8cbb38b8d7a7765d9ae5))

# [1.1.0-rc.2](https://github.com/nichollascarter/subjx/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2022-02-14)


### Bug Fixes

* fix wrong transform-origin position for nested elements ([93af678](https://github.com/nichollascarter/subjx/commit/93af67887834b0c455ab8cbb38b8d7a7765d9ae5))

# [1.1.0-rc.1](https://github.com/nichollascarter/subjx/compare/v1.0.0...v1.1.0-rc.1) (2022-02-13)


### Features

* **src:** add setCenterPoint method ([7995cf5](https://github.com/nichollascarter/subjx/commit/7995cf504434d98e60bfa6e240a7e14eee8372fb)), closes [#56](https://github.com/nichollascarter/subjx/issues/56)
* added transform origin support ([75e33de](https://github.com/nichollascarter/subjx/commit/75e33de273d896b3b3e64593be123bea4dd6d64f))

# [1.0.0](https://github.com/nichollascarter/subjx/compare/v0.3.9...v1.0.0) (2021-12-15)


Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2021
Copyright (c) 2018-2022

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,42 @@ xDraggable.applyAlignment('tr');
// useful when element's container was transformed from outside
xDraggable.fitControlsToSize();

// Returns rotation point handle to default position
xDraggable.resetCenterPoint();
// Sets the origin for an element's transformations
xDraggable.setTransformOrigin(
{
x, // absolute the origin's position x coordinate
y, // absolute he origin's position y coordinate
dx, // offset the origin's position x coordinate
dy // offset the origin's position y coordinate
},
pin // leaves current origin fixed if true or not if false
);

// Sets transform origin to default
xDraggable.resetTransformOrigin();

// Returns element's current dimensions
xDraggable.getDimensions();
```

### Options

|Property|Description|Type|Default|
|--|--|--|--|
| **container** | Transformation coordinate system | `'selector'` \| `element` | element.parentNode |
| **controlsContainer** | "controls" will append to this element | `'selector'` \| `element` | element.parentNode |
| **controlsContainer** | Parent element of 'controls' | `'selector'` \| `element` | element.parentNode |
| **axis** | Constrain movement along an axis | `string`: 'x' \| 'y' \| 'xy' | 'xy' |
| **snap** | Snapping to grid in pixels/radians | `object` | { x: 10, y: 10, angle: 10 } |
| **each** | Mimic behavior with other '.draggable' elements | `object` | { move: false, resize: false, rotate: false } |
| **proportions** | Keep aspect ratio when resizing | `boolean` | false |
| **proportions** | Keep aspect ratio on resizing / scaling | `boolean` | false |
| **draggable** | Allow or deny an action | `boolean` | true |
| **resizable** | Allow or deny an action | `boolean` | true |
| **rotatable** | Allow or deny an action | `boolean` | true |
| **scalable** | Applies scaling only to root element | `boolean` | false |
| **restrict** | Restricts element dragging/resizing/rotation | `'selector'` \| `element` | - |
| **rotatorAnchor** | Rotator anchor direction | `string`: 'n' \| 's' \| 'w' \| 'e' | 'e' |
| **rotatorOffset** | Rotator offset | `number` | 50 |
| **transformOrigin** | Sets the origin for an element's transformations | `boolean` \| Array<number> | false |

#### Notice: In most cases, it is recommended to use 'proportions' option

Expand Down
4 changes: 2 additions & 2 deletions dist/js/subjx.common.js

Large diffs are not rendered by default.

Loading

0 comments on commit d7ed3ac

Please sign in to comment.