add rotation things

This commit is contained in:
raphael
2020-05-08 15:10:41 +02:00
parent 30acafc1ec
commit d802d006e7
4 changed files with 28 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import "jquery-ui/ui/core";
import "jquery-ui/ui/widgets/draggable";
import "jquery-ui/ui/widgets/resizable";
import "jquery-ui-rotatable/jquery.ui.rotatable"
import "jquery-ui/themes/base/resizable.css";
import "../css/main.css";

View File

@@ -607,6 +607,27 @@ const whiteboard = {
_this.mouseOverlay.append(imgDiv);
imgDiv.draggable();
imgDiv.resizable();
var params = {
// Callback fired on rotation start.
start: function (event, ui) {
},
// Callback fired during rotation.
rotate: function (event, ui) {
},
// Callback fired on rotation end.
stop: function (event, ui) {
},
// Set the rotation center
rotationCenterOffset: {
top: 20,
left: 20
},
transforms: {
translate: '(50%, 50%)',
scale: '(2)'
}
};
imgDiv.rotatable();
// render newly added icons
dom.i2svg();