Author: jmorliaguet
Date: Sat Dec 17 14:48:04 2005
New Revision: 2046

Modified:
   cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js
   cpsskins/branches/jmo-perspectives/ui/framework/pdlib.js
Log:

- getMouseX() is Event.pointerX()
- getMouseY() is Event.pointerY()



Modified: cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js        
(original)
+++ cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js        Sat Dec 
17 14:48:04 2005
@@ -485,8 +485,8 @@
 function setupTooltip(mo) {
   mo.onmouseover = function(e) {
     var target = Event.element(e);
-    tooltip_box.style.top = '' + (getMouseY(e) + 20) + 'px';
-    tooltip_box.style.left = '' + (getMouseX(e)) + 'px';
+    tooltip_box.style.top = '' + (Event.pointerY(e) + 20) + 'px';
+    tooltip_box.style.left = '' + (Event.pointerX(e)) + 'px';
     tooltip_box.innerHTML = target.getAttribute('hint');
     tooltip_active = true;
     setTimeout("showTooltip()", 1000);

Modified: cpsskins/branches/jmo-perspectives/ui/framework/pdlib.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/pdlib.js    (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/pdlib.js    Sat Dec 17 
14:48:04 2005
@@ -23,24 +23,10 @@
 var pd_contextsubmenu = null; // The context submenu node being displayed
 var pd_max_contextmenu_width = 250; // Threshold for faulty browsers
 
-function getMouseX(e) {
-  var scroll_x = window.pageXOffset ||
-    document.documentElement.scrollLeft ||
-    document.body.scrollLeft;
-  return e.pageX ? e.pageX : e.clientX + scroll_x;
-}
-
-function getMouseY(e) {
-  var scroll_y = window.pageYOffset ||
-    document.documentElement.scrollTop ||
-    document.body.scrollTop;
-  return e.pageY ? e.pageY : e.clientY + scroll_y;
-}
-
 /* DOM events */
 function pd_DragEvent(e) {
-  this.start_x = getMouseX(e);
-  this.start_y = getMouseY(e);
+  this.start_x = Event.pointerX(e);
+  this.start_y = Event.pointerY(e);
   this.feedback_node = document.getElementById("drag-feedback-box");
   this.began_moving = false;
 }
@@ -118,8 +104,8 @@
     return;
   if (!e)
     e = event;
-  var x = getMouseX(e)
-  var y = getMouseY(e)
+  var x = Event.pointerX(e)
+  var y = Event.pointerY(e)
 
   if (!pd_drag_event.began_moving) {
     if (Math.abs(x - pd_drag_event.start_x) <= 3 &&
@@ -243,8 +229,8 @@
 
   var page_w = window.innerWidth || document.body.clientWidth;
   var page_h = window.innerHeight || document.body.clientHeight;
-  var x = getMouseX(e);
-  var y = getMouseY(e);
+  var x = Event.pointerX(e);
+  var y = Event.pointerY(e);
   var menuX, menuY;
 
   if (page_w - e.clientX < menunode.offsetWidth) {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to