@quinninc/pixi-transformer 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -126,7 +126,7 @@ export class Transformer extends Pixi.Container {
|
|
|
126
126
|
this.addChild(this.moveHandle);
|
|
127
127
|
function changeAnchorPoint(ev) {
|
|
128
128
|
// console.log("TAPP this, that - ", this, that);
|
|
129
|
-
if (!ev.ctrlKey)
|
|
129
|
+
if (!ev.ctrlKey && !ev.metaKey)
|
|
130
130
|
return;
|
|
131
131
|
if (!that.target)
|
|
132
132
|
return;
|
|
@@ -170,7 +170,7 @@ export class Transformer extends Pixi.Container {
|
|
|
170
170
|
// console.log("onMoveHandleDown this, that - ", this, that);
|
|
171
171
|
if (!that.target)
|
|
172
172
|
return;
|
|
173
|
-
if (downEvent.ctrlKey) {
|
|
173
|
+
if (downEvent.ctrlKey || downEvent.metaKey) {
|
|
174
174
|
this.draggingPivot = true;
|
|
175
175
|
}
|
|
176
176
|
// data
|
|
@@ -348,7 +348,7 @@ export class Transformer extends Pixi.Container {
|
|
|
348
348
|
const endAngle = calcAngleRadians(relativeEndPoint.x, relativeEndPoint.y);
|
|
349
349
|
const deltaAngle = endAngle - startAngle;
|
|
350
350
|
let finalRotation = this.targetStartRotation + deltaAngle;
|
|
351
|
-
if (moveEvent.ctrlKey) {
|
|
351
|
+
if (moveEvent.ctrlKey || moveEvent.metaKey) {
|
|
352
352
|
const snapAngle = 45;
|
|
353
353
|
let finalAngle = (finalRotation * 180) / Math.PI;
|
|
354
354
|
const proximity = Math.min(Math.abs(finalAngle % snapAngle), snapAngle - Math.abs(finalAngle % snapAngle));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quinninc/pixi-transformer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/Quinn-Care-Private-Limited/pixi-transformer"
|
|
7
7
|
},
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"package.json",
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"pixi.js",
|
|
19
|
+
"transformer",
|
|
20
|
+
"pixi.js v8"
|
|
21
|
+
],
|
|
17
22
|
"author": {
|
|
18
23
|
"name": "Rohit Kaushal",
|
|
19
24
|
"url": "https://github.com/RohitKaushal7"
|