Skip to content

Commit

Permalink
no cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Dec 15, 2024
1 parent 63fdfdb commit da61500
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,27 @@ qx.Class.define("osparc.dashboard.DragWidget", {
__onMouseMoveDragging: function(e) {
if (this.getContentElement()) {
const domEl = this.getContentElement().getDomElement();
domEl.style.left = `${e.pageX + 15}px`;
domEl.style.top = `${e.pageY + 15}px`;
domEl.style.left = `${e.pageX + 12}px`;
domEl.style.top = `${e.pageY + 12}px`;
}
},

start: function() {
this.show();
document.addEventListener("mousemove", this.__onMouseMoveDragging.bind(this), false);

// this widget will give the drop validity feedback
const cursor = qx.ui.core.DragDropCursor.getInstance();
cursor.setAppearance("dragdrop-no-cursor");
},

end: function() {
this.exclude();
document.removeEventListener("mousemove", this.__onMouseMoveDragging.bind(this), false);

// reset to default
const cursor = qx.ui.core.DragDropCursor.getInstance();
cursor.setAppearance("dragdrop-cursor");
},
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ qx.Theme.define("osparc.theme.Appearance", {
extend: osparc.theme.common.Appearance,

appearances: {
"dragdrop-no-cursor": {
style: states => {
return {
source: "",
}
}
},

"material-button-invalid": {},
"pb-list": {
include: "list",
Expand Down

0 comments on commit da61500

Please sign in to comment.