corrade-nucleus-nucleons
/base/000_base/js/wm/wm.js |
@@ -3,7 +3,7 @@ |
return Math.max.apply(null, |
$.map($('.window-manager-window'), function(e, n) { |
if ($(e).css('position') != 'static') |
return parseInt($(e).css('z-index')) || 1; |
return parseInt($(e).css('z-index')) || 2; |
}) |
); |
} |
@@ -36,6 +36,36 @@ |
} |
}) |
.allowFrom('.panel-heading'); |
|
// Window manager icons. |
interact('.window-manager-icon') |
.draggable({ |
// enable inertial throwing |
inertia: false, |
// keep the element within the area of it's parent |
restrict: { |
restriction: $('#window-manager-desktop').get(0), |
endOnly: true, |
elementRect: { top: 0, left: 0, bottom: 1, right: 1 } |
}, |
snap: { |
targets: [ |
interact.createSnapGrid({ x: 64, y: 64 }) |
], |
range: Infinity, |
relativePoints: [ { x: 0, y: 0 } ] |
}, |
// enable autoScroll |
autoScroll: true, |
|
onmove: dragMoveListener, |
onend: function (event) { |
event.target.style.opacity = 1; |
}, |
onstart: function(event) { |
event.target.style.opacity = 0.5; |
} |
}); |
|
// Closing windows. |
$(document).on('click', '.window-manager-close-button', function(event) { |