[Laszlo-checkins] r8182 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf
max@openlaszlo.org
max at openlaszlo.org
Wed Mar 5 14:13:06 PST 2008
Author: max
Date: 2008-03-05 14:13:01 -0800 (Wed, 05 Mar 2008)
New Revision: 8182
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
Log:
Change 20080305-maxcarlson-w by maxcarlson at Roboto on 2008-03-05 13:48:58 PST
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix contextmenu for canvas, text and inputtext
New Features:
Bugs Fixed: LPP-5533
Technical Reviewer: promanik
QA Reviewer: a.bargull at intensis.de
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Attach to getMCRef() for canvas and LzTextSprite instances. If this is the canvas, attache to _root.menu. Move testing inside if ($debug) case.
Tests: See LPP-5533 and LPP-4212
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-03-05 21:52:19 UTC (rev 8181)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-03-05 22:13:01 UTC (rev 8182)
@@ -1634,9 +1634,13 @@
}
// [todo hqm 01-24-07] SWF-specific
- if (this.owner == canvas) {
- // if this is the canvas sprite
+ if (this.owner == canvas || this instanceof LzTextSprite) {
+ // check canvas for LPP-4214, instanceof LzTextSprite for LPP-5533
var mc = this.getMCRef();
+ if (this.owner == canvas) {
+ // must use _root if canvas
+ var mc = _root;
+ }
if (mc != null) {
mc.menu = cmenu;
}
@@ -1651,8 +1655,10 @@
mb.menu = cmenu;
}
- if (mb == null && mc == null) {
- if ($debug) Debug.warn("LzView.setContextMenu: cannot set menu on view %w, it has no foreground or background movieclip", this.owner);
+ if ($debug) {
+ if (mb == null && mc == null) {
+ Debug.warn("LzView.setContextMenu: cannot set menu on view %w, it has no foreground or background movieclip", this.owner);
+ }
}
}
More information about the Laszlo-checkins
mailing list