Opened 13 years ago

Closed 12 years ago

#2296 closed defect (wontfix)

[PATCH] Add a onResize method when a handler has been moved on SplitContainer

Reported by: vincent.demay@… Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

This patch add a listener when an handler in SplitContainer? has been moved :

Index: /Users/doume/Dev/Wicket/wicket-contrib-dojo-1.3/src/main/java/wicket/contrib/dojo/dojo-0.4/src/widget/SplitContainer.js =================================================================== --- /Users/doume/Dev/Wicket/wicket-contrib-dojo-1.3/src/main/java/wicket/contrib/dojo/dojo-0.4/src/widget/SplitContainer.js (revision 1481) +++ /Users/doume/Dev/Wicket/wicket-contrib-dojo-1.3/src/main/java/wicket/contrib/dojo/dojo-0.4/src/widget/SplitContainer.js (working copy) @@ -454,6 +454,14 @@

}

this.layoutPanels();

+ + this.onResize(); + }, + + / + * Resize handler for to listen to the resizing + */ + onResize: function(){

},

showSizingLine: function(){

Change History (2)

comment:1 Changed 13 years ago by vincent.demay@…

Here is a better patch : It works when window is resized and when split move

Index: /Users/doume/Dev/Wicket/wicket-contrib-dojo-1.3/src/main/java/wicket/contrib/dojo/dojo-0.4/src/widget/SplitContainer.js
===================================================================
--- /Users/doume/Dev/Wicket/wicket-contrib-dojo-1.3/src/main/java/wicket/contrib/dojo/dojo-0.4/src/widget/SplitContainer.js	(revision 1481)
+++ /Users/doume/Dev/Wicket/wicket-contrib-dojo-1.3/src/main/java/wicket/contrib/dojo/dojo-0.4/src/widget/SplitContainer.js	(working copy)
@@ -257,6 +257,8 @@
 			this.children[i].checkSize();
 			pos += size;
 		}
+		
+		this.onResize();
 	},
@@ -454,6 +454,14 @@
 		}
 
 		this.layoutPanels();
+	},
+	
+	/**
+	 * Resize handler for to listen to the resizing
+	 */
+	onResize: function(){
 	},
 
 	showSizingLine: function(){

comment:2 Changed 12 years ago by bill

Resolution: wontfix
Status: newclosed

Sorry, I don't want onResized() to be called when the SplitContainer? hasn't changed size, and in any case, the onResized() method has been removed from dijit code altogether. You can connect to layoutPanels() or some other SplitContainer? method to detect when one of the dividers has been moved.

Note: See TracTickets for help on using tickets.