21 this.leftHandle = this.selector.find(".Ldt-sliceLeftHandle"); |
21 this.leftHandle = this.selector.find(".Ldt-sliceLeftHandle"); |
22 this.rightHandle = this.selector.find(".Ldt-sliceRightHandle"); |
22 this.rightHandle = this.selector.find(".Ldt-sliceRightHandle"); |
23 |
23 |
24 var left = this.selector.offset().left; |
24 var left = this.selector.offset().left; |
25 var top = this.selector.offset().top; |
25 var top = this.selector.offset().top; |
26 |
26 |
27 // contain the handles correctly - we cannot set |
27 // contain the handles correctly - we cannot set |
28 // containment: parent because it wouldn't allow to select the |
28 // containment: parent because it wouldn't allow to select the |
29 // whole slice, so we have to compute a box in which the slice is |
29 // whole slice, so we have to compute a box in which the slice is |
30 // allowed to move. |
30 // allowed to move. |
31 var containment = [left - 8, top, this.selector.width() + left, top]; |
31 var containment = [left - 8, top, this.selector.width() + left, top]; |
|
32 // var containment = [left - 16, top, this.selector.width() + left - 8, top]; |
32 this.leftHandle.draggable({axis: "x", |
33 this.leftHandle.draggable({axis: "x", |
33 drag: IriSP.wrap(this, this.leftHandleDragged), |
34 drag: IriSP.wrap(this, this.leftHandleDragged), |
34 containment: containment |
35 containment: containment |
35 }); |
36 }); |
36 |
37 |
37 containment = [left, top, this.selector.width() + left, top]; |
38 containment = [left, top, this.selector.width() + left, top]; |
|
39 // containment = [left, top, this.selector.width() + left - 8, top]; |
38 this.rightHandle.draggable({axis: "x", |
40 this.rightHandle.draggable({axis: "x", |
39 drag: IriSP.wrap(this, this.rightHandleDragged), |
41 drag: IriSP.wrap(this, this.rightHandleDragged), |
40 containment: containment |
42 containment: containment |
41 }); |
43 }); |
42 |
44 |