|
|
@ -170,12 +170,12 @@ jQuery._farbtastic = function (container, callback) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Mousedown handler |
|
|
|
* Mousedown handler |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fb.mousedown = function (event) { |
|
|
|
fb.click = function (event) { |
|
|
|
// Capture mouse
|
|
|
|
// Capture mouse
|
|
|
|
if (!document.dragging) { |
|
|
|
// if (!document.dragging) {
|
|
|
|
$(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); |
|
|
|
// $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);
|
|
|
|
document.dragging = true; |
|
|
|
// document.dragging = true;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// Check which area is being dragged
|
|
|
|
// Check which area is being dragged
|
|
|
|
var pos = fb.widgetCoords(event); |
|
|
|
var pos = fb.widgetCoords(event); |
|
|
@ -210,12 +210,12 @@ jQuery._farbtastic = function (container, callback) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Mouseup handler |
|
|
|
* Mouseup handler |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fb.mouseup = function () { |
|
|
|
// fb.mouseup = function () {
|
|
|
|
// Uncapture mouse
|
|
|
|
// // Uncapture mouse
|
|
|
|
$(document).unbind('mousemove', fb.mousemove); |
|
|
|
// $(document).unbind('mousemove', fb.mousemove);
|
|
|
|
$(document).unbind('mouseup', fb.mouseup); |
|
|
|
// $(document).unbind('mouseup', fb.mouseup);
|
|
|
|
document.dragging = false; |
|
|
|
// document.dragging = false;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Update the markers and styles |
|
|
|
* Update the markers and styles |
|
|
@ -333,7 +333,7 @@ jQuery._farbtastic = function (container, callback) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Install mousedown handler (the others are set on the document on-demand)
|
|
|
|
// Install mousedown handler (the others are set on the document on-demand)
|
|
|
|
$('*', e).mousedown(fb.mousedown); |
|
|
|
$('*', e).click(fb.click); |
|
|
|
|
|
|
|
|
|
|
|
// Init color
|
|
|
|
// Init color
|
|
|
|
fb.setColor('#000000'); |
|
|
|
fb.setColor('#000000'); |
|
|
|