@@ -1037,6 +1037,24 @@ javaxt.dhtml.utils = {
10371037 //**************************************************************************
10381038 //** initDrag
10391039 //**************************************************************************
1040+ /** Used to update a DOM element and enable dragging. It is up to the caller
1041+ * to process the drag events and update the DOM element via event handlers
1042+ * defined in the config. Example:
1043+ <pre>
1044+ initDrag(div, {
1045+ onDragStart: function(mouseX, mouseY){
1046+ //Do something, like compute x/y offsets, update cursor, etc
1047+ },
1048+ onDrag: function(mouseX, mouseY){
1049+ this.style.left = x + 'px';
1050+ this.style.top = y + 'px';
1051+ },
1052+ onDragEnd: function(){
1053+ //Do something, like repost position, update cursor, etc
1054+ }
1055+ });
1056+ </pre>
1057+ */
10401058 initDrag : function ( dragHandle , config ) {
10411059 javaxt . dhtml . utils . addNoSelectRule ( ) ;
10421060
@@ -1245,11 +1263,17 @@ javaxt.dhtml.utils = {
12451263 //**************************************************************************
12461264 //** addResizeListener
12471265 //**************************************************************************
1248- /** Used to watch for resize events for a given element. Credit:
1249- * http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
1266+ /** Used to watch for resize events for a given element.
12501267 */
12511268 addResizeListener : function ( element , fn ) {
12521269
1270+ /* This is a really old hack from 2013 when there were limited
1271+ * cross-browser options to watch for resize events. The code was
1272+ * lifted directly from this link:
1273+ * http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
1274+ */
1275+
1276+
12531277 var destroy , isDestroyed = false ;
12541278
12551279 var requestFrame = ( function ( ) {
0 commit comments