This repository has been archived on 2020-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
plemp/public/dragreg.js

19 lines
567 B
JavaScript

var DragRegObserver = Class.create();
DragRegObserver.prototype = {
initialize: function(element) {
this.element = $(element);
},
onStart: function() {},
onEnd: function (eventName, draggable, event) {
if (Draggables.activeDraggable.element == this.element) {
elem = draggable.element;
new Ajax.Request('http://localhost:3301/savepos/' + elem.id +
'/' + elem.style.top + '/' + elem.style.left);
}
}
}
function maxZIndex() {
return $$('.draggable').map(function(d) { return d.getStyle("z-index") }).max();
}