Revision: 1062
Author: allain.lalonde
Date: Tue Aug 31 11:22:30 2010
Log: JS: fixing bug with clicking on text rather than on day, or month
nodes.
http://code.google.com/p/piccolo2d/source/detail?r=1062
Modified:
/piccolo2d.js/trunk/examples/calendar.html
=======================================
--- /piccolo2d.js/trunk/examples/calendar.html Tue Aug 31 09:03:30 2010
+++ /piccolo2d.js/trunk/examples/calendar.html Tue Aug 31 11:22:30 2010
@@ -168,6 +168,15 @@
} else {
newFocus = event.pickedNodes[0];
}
+
+ while (newFocus != null) {
+ if (newFocus instanceof Day) {
+ break;
+ } else if (newFocus instanceof Month) {
+ break;
+ }
+ newFocus = newFocus.parent;
+ }
if (this.lastFocus === newFocus) {
newFocus = this.logicalParentOf(newFocus);
--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en