@deckdeckgo/drag-resize-rotate
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.0-beta.3-1
@@ -0,1 +1,9 @@ | ||
<a name="1.0.0-beta.3-1"></a> | ||
# 1.0.0-beta.3-1 (2020-03-03) | ||
### Fix | ||
- rotation miscalculated on first click | ||
<a name="1.0.0-beta.3"></a> | ||
@@ -2,0 +10,0 @@ |
@@ -140,4 +140,5 @@ 'use strict'; | ||
initStartPositionsRotation() { | ||
this.centerX = this.el.getBoundingClientRect().left + this.el.offsetWidth / 2; | ||
this.centerY = this.el.getBoundingClientRect().top + this.el.offsetHeight / 2; | ||
const rect = this.el.getBoundingClientRect(); | ||
this.centerX = rect.left + rect.width / 2; | ||
this.centerY = rect.top + rect.height / 2; | ||
} | ||
@@ -144,0 +145,0 @@ initStartPositionsResize() { |
@@ -129,4 +129,5 @@ import { h, Host } from "@stencil/core"; | ||
initStartPositionsRotation() { | ||
this.centerX = this.el.getBoundingClientRect().left + this.el.offsetWidth / 2; | ||
this.centerY = this.el.getBoundingClientRect().top + this.el.offsetHeight / 2; | ||
const rect = this.el.getBoundingClientRect(); | ||
this.centerX = rect.left + rect.width / 2; | ||
this.centerY = rect.top + rect.height / 2; | ||
} | ||
@@ -133,0 +134,0 @@ initStartPositionsResize() { |
@@ -1,1 +0,1 @@ | ||
import{p as t,b as e}from"./p-6f05f556.js";t().then(t=>e([["p-ubkdhecb",[[1,"deckgo-drr",{unit:[1],resize:[4],drag:[1],rotation:[4],width:[32],height:[32],minWidth:[32],minHeight:[32],top:[32],left:[32],rotate:[32],selected:[32],moving:[32]}]]]],t)); | ||
import{p as t,b as i}from"./p-6f05f556.js";t().then(t=>i([["p-0ib4wuvp",[[1,"deckgo-drr",{unit:[1],resize:[4],drag:[1],rotation:[4],width:[32],height:[32],minWidth:[32],minHeight:[32],top:[32],left:[32],rotate:[32],selected:[32],moving:[32]}]]]],t)); |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-bda7cb80.system.js"],(function(){"use strict";var t,e;return{setters:[function(i){t=i.p;e=i.b}],execute:function(){t().then((function(t){return e([["p-3wugwpbw.system",[[1,"deckgo-drr",{unit:[1],resize:[4],drag:[1],rotation:[4],width:[32],height:[32],minWidth:[32],minHeight:[32],top:[32],left:[32],rotate:[32],selected:[32],moving:[32]}]]]],t)}))}}})); | ||
System.register(["./p-bda7cb80.system.js"],(function(){"use strict";var t,e;return{setters:[function(n){t=n.p;e=n.b}],execute:function(){t().then((function(t){return e([["p-jnzunxic.system",[[1,"deckgo-drr",{unit:[1],resize:[4],drag:[1],rotation:[4],width:[32],height:[32],minWidth:[32],minHeight:[32],top:[32],left:[32],rotate:[32],selected:[32],moving:[32]}]]]],t)}))}}})); |
@@ -238,4 +238,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
class_1.prototype.initStartPositionsRotation = function () { | ||
this.centerX = this.el.getBoundingClientRect().left + this.el.offsetWidth / 2; | ||
this.centerY = this.el.getBoundingClientRect().top + this.el.offsetHeight / 2; | ||
var rect = this.el.getBoundingClientRect(); | ||
this.centerX = rect.left + rect.width / 2; | ||
this.centerY = rect.top + rect.height / 2; | ||
}; | ||
@@ -242,0 +243,0 @@ class_1.prototype.initStartPositionsResize = function () { |
@@ -136,4 +136,5 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './core-527d05e9.js'; | ||
initStartPositionsRotation() { | ||
this.centerX = this.el.getBoundingClientRect().left + this.el.offsetWidth / 2; | ||
this.centerY = this.el.getBoundingClientRect().top + this.el.offsetHeight / 2; | ||
const rect = this.el.getBoundingClientRect(); | ||
this.centerX = rect.left + rect.width / 2; | ||
this.centerY = rect.top + rect.height / 2; | ||
} | ||
@@ -140,0 +141,0 @@ initStartPositionsResize() { |
{ | ||
"name": "@deckdeckgo/drag-resize-rotate", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.3-1", | ||
"description": "A Web Component to drag, resize and rotate any element", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -13,3 +13,3 @@ # DeckDeckGo - Draggable, Resizable and Rotatable | ||
To get started with this Web Component, have a look to its [documentation](https://docs.deckdeckgo.com/components/dnr). | ||
To get started with this Web Component, have a look to its [documentation](https://docs.deckdeckgo.com/components/drr). | ||
@@ -22,3 +22,3 @@ ## Develop | ||
git clone https://github.com/deckgo/deckdeckgo | ||
cd deckdeckgo/webcomponents/dnr | ||
cd deckdeckgo/webcomponents/drag-resize-rotate | ||
npm install | ||
@@ -25,0 +25,0 @@ npm run start |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14821
923551