temporary fix for ff. popcorn-port
authorhamidouk
Fri, 03 Feb 2012 16:41:31 +0100
branchpopcorn-port
changeset 775 59927257f43b
parent 774 25cb63882c3c
child 776 f3c758ef9952
temporary fix for ff.
src/js/widgets/sliceWidget.js
--- a/src/js/widgets/sliceWidget.js	Fri Feb 03 16:01:47 2012 +0100
+++ b/src/js/widgets/sliceWidget.js	Fri Feb 03 16:41:31 2012 +0100
@@ -31,8 +31,7 @@
     // 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];
-    console.log(containment);
-    //if (browser.
+
     // var containment = [left - 16, top, this.selector.width() + left - 8, top];
     this.leftHandle.draggable({axis: "x",
     drag: IriSP.wrap(this, this.leftHandleDragged),  
@@ -45,16 +44,20 @@
     drag: IriSP.wrap(this, this.rightHandleDragged),    
     containment: containment
     });
-  } else { /* firefox */
-
+  
+  } 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: parent
+    containment: containment
     });
 
+    containment = [left, top, this.selector.width() + left - 8, top];
     this.rightHandle.draggable({axis: "x",
     drag: IriSP.wrap(this, this.rightHandleDragged),    
-    containment: parent
+    containment: containment
     });
   }