--- a/src/js/widgets/sliceWidget.js Mon Feb 06 10:56:39 2012 +0100
+++ b/src/js/widgets/sliceWidget.js Mon Feb 06 11:37:48 2012 +0100
@@ -24,42 +24,21 @@
var left = this.selector.offset().left;
var top = this.selector.offset().top;
- // a bug in firefox makes it use the wrong format
- if (!IriSP.jQuery.browser.mozilla) {
- // contain the handles correctly - we cannot set
- // containment: parent because it wouldn't allow to select the
- // whole slice, so we have to compute a box in which the slice is
- // allowed to move.
- var containment = [left - 8, top, this.selector.width() + left, top];
+ var containment = [left - 8, top, this.selector.width() + left, top];
- // var containment = [left - 16, top, this.selector.width() + left - 8, top];
- this.leftHandle.draggable({axis: "x",
- drag: IriSP.wrap(this, this.leftHandleDragged),
- containment: containment
- });
+ // var containment = [left - 16, top, this.selector.width() + left - 8, top];
+ this.leftHandle.draggable({axis: "x",
+ drag: IriSP.wrap(this, this.leftHandleDragged),
+ containment: "parent"
+ });
- containment = [left, top, this.selector.width() + left, top];
- // containment = [left, top, this.selector.width() + left - 8, top];
- this.rightHandle.draggable({axis: "x",
- drag: IriSP.wrap(this, this.rightHandleDragged),
- containment: containment
- });
+ containment = [left, top, this.selector.width() + left, top];
+ // containment = [left, top, this.selector.width() + left - 8, top];
+ this.rightHandle.draggable({axis: "x",
+ drag: IriSP.wrap(this, this.rightHandleDragged),
+ containment: "parent"
+ });
- } else { // firefox
- // we need to define a containment specific to firefox.
-
- var containment = [left - 16, top, this.selector.width() + left - 8, top];
- this.leftHandle.draggable({axis: "x",
- drag: IriSP.wrap(this, this.leftHandleDragged),
- containment: containment
- });
-
- containment = [left, top, this.selector.width() + left - 8, top];
- this.rightHandle.draggable({axis: "x",
- drag: IriSP.wrap(this, this.rightHandleDragged),
- containment: containment
- });
- }
this.leftHandle.css("position", "absolute");
this.rightHandle.css("position", "absolute");