Forráskód Böngészése

Corrected Zoom indication when it goes out-of-bounds

Raghav Arora 6 éve
szülő
commit
1e18cdafce
1 módosított fájl, 6 hozzáadás és 0 törlés
  1. 6 0
      nova/templates/dataset/wave.html

+ 6 - 0
nova/templates/dataset/wave.html

@@ -300,7 +300,10 @@
                 resize: function (event, ui ){
                     h = ui.size.height;
                     t = ui.position.top;
+                    W = $(this).parent().width();
                     $("#yz-zoom-selection").css({'height':h, 'width': h,'left': t});
+                    t2 = Math.round(parseInt($("#yz-zoom-selection").css('top'), 10));
+                    if (h+ t2 >= W) $("#yz-zoom-selection").css({'top':W-h});
                 }
             }).draggable({
                 containment: "parent",
@@ -323,7 +326,10 @@
                 resize: function (event, ui ){
                     w = ui.size.width;
                     l = ui.position.left;
+                    H = $(this).parent().height()
                     $("#xy-zoom-selection").css({'height':w, 'width': w,'top':l});
+                    l2 = Math.round(parseInt($("#xy-zoom-selection").css('left'), 10));
+                    if (w+ l2 >= H) $("#xy-zoom-selection").css({'left':H-w});
                 }
             }).draggable({
                 containment: "parent",