Don't bully people that's mean

Bully cursors into inheriting a global cursor for resizing.
😈
main
Isaiah Odhner 2014-08-18 18:31:03 -04:00
parent ab3c8d2438
commit e8d5de2735
4 changed files with 13 additions and 4 deletions

View File

@ -67,13 +67,11 @@ function $Handles($container, canvas, options){
dragged = false;
if(e.button === 0){
$G.on("mousemove", drag);
$body.css({cursor:cursor});
$(canvas).css({pointerEvents:"none"});
$body.css({cursor:cursor}).addClass("jspaint-cursor-bully");
}
$G.one("mouseup", function(e){
$G.off("mousemove", drag);
$body.css({cursor:"auto"});
$(canvas).css({pointerEvents:""});
$body.css({cursor:""}).removeClass("jspaint-cursor-bully");
$resize_ghost.remove();
if(dragged){
@ -82,6 +80,10 @@ function $Handles($container, canvas, options){
$container.trigger("update");
});
});
$h.on("mousedown selectstart", function(e){
e.stopPropagation();
e.preventDefault();
});
}
var update_handle = function(){

View File

@ -61,6 +61,8 @@ Selection.prototype.instantiate = function(_img, _passive){
}
sel.$ghost.append(sel.canvas);
//sel.$handles = $Handles(sel.$ghost, sel.canvas, {outset: 2});
var mox, moy;
var mousemove = function(e){
var m = e2c(e);

View File

@ -89,6 +89,8 @@ TextBox.prototype.instantiate = function(){
tb.$ghost.append(tb.$editor);
tb.$editor.focus();
//tb.$handles = $Handles(tb.$ghost, tb.$editor[0], {outset: 2});
var mox, moy;
var mousemove = function(e){
var m = e2c(e);

View File

@ -23,6 +23,9 @@
outline: 1px dotted #7b7b7b; /* what it is */
outline: 1px dotted invert; /* what it should be */
}
.jspaint-cursor-bully * {
cursor: inherit !important;
}
.jspaint-menus * {
font: menu;