[Zope-CVS] CVS: Packages/PDLib - pdlib.js:1.2
Shane Hathaway
shane@zope.com
Tue, 1 Jul 2003 11:42:43 -0400
Update of /cvs-repository/Packages/PDLib
In directory cvs.zope.org:/tmp/cvs-serv22987
Modified Files:
pdlib.js
Log Message:
added .px suffixes for position and width style attributes
=== Packages/PDLib/pdlib.js 1.1.1.1 => 1.2 ===
--- Packages/PDLib/pdlib.js:1.1.1.1 Mon Dec 2 16:36:34 2002
+++ Packages/PDLib/pdlib.js Tue Jul 1 11:42:43 2003
@@ -111,23 +111,25 @@
if (menunode.offsetWidth >= pd_max_contextmenu_width) {
// It's likely that the browser ignored "display: table"
// and used the full width of the page. Use a workaround.
- menunode.style.width = pd_max_contextmenu_width;
+ menunode.style.width = '' + (pd_max_contextmenu_width) + 'px';
}
// Choose a location for the menu based on where the user clicked
if (page_w - e.clientX < menunode.offsetWidth) {
// Close to the right edge
- menunode.style.left = page_x + e.clientX - menunode.offsetWidth - 1;
+ menunode.style.left = '' + (
+ page_x + e.clientX - menunode.offsetWidth - 1) + 'px';
}
else {
- menunode.style.left = page_x + e.clientX + 1;
+ menunode.style.left = '' + (page_x + e.clientX + 1) + 'px';
}
if (page_h - e.clientY < menunode.offsetHeight) {
// Close to the bottom
- menunode.style.top = page_y + e.clientY - menunode.offsetHeight - 1;
+ menunode.style.top = '' + (
+ page_y + e.clientY - menunode.offsetHeight - 1) + 'px';
}
else {
- menunode.style.top = page_y + e.clientY + 1;
+ menunode.style.top = '' + (page_y + e.clientY + 1) + 'px';
}
pd_open_context_menu = menunode;
@@ -234,10 +236,10 @@
var item = pd_selected_items[0]; // TODO: expand box to include all items
pd_drag_event.began_moving = true;
- feedback_node_style.left = x + 5;
- feedback_node_style.top = y + 5;
- feedback_node_style.width = item.offsetWidth - 2;
- feedback_node_style.height = item.offsetHeight - 2;
+ feedback_node_style.left = '' + (x + 5) + 'px';
+ feedback_node_style.top = '' + (y + 5) + 'px';
+ feedback_node_style.width = '' + (item.offsetWidth - 2) + 'px';
+ feedback_node_style.height = '' + (item.offsetHeight - 2) + 'px';
feedback_node_style.display = "block";
// Show some of the normally invisible targets.
@@ -269,8 +271,8 @@
}
pd_firstDrag(x, y);
}
- pd_drag_event.feedback_node.style.left = x + 5;
- pd_drag_event.feedback_node.style.top = y + 5;
+ pd_drag_event.feedback_node.style.left = '' + (x + 5) + 'px';
+ pd_drag_event.feedback_node.style.top = '' + (y + 5) + 'px';
}
function pd_finishDrag() {