Hi, I think the problem is that SVG Image class is in Basic library, while svg|Image css declaration is in Graphics library Since Maven links libraries in use, this show an inconsistency not shown in ANT.
I think SVG things should move to SVG library instead for coherence Thoughts? El jue., 12 mar. 2020 a las 20:19, Yishay Weiss (<[email protected]>) escribió: > svg|Image > { > vertical-align: top; > IBeadModel: > ClassReference("org.apache.royale.html.beads.models.ImageModel"); > IBeadView: > ClassReference("org.apache.royale.svg.beads.ImageView"); > } > > This is what I have under > > \frameworks\projects\Graphics\src\main\resources\defaults.css > > HTMLElementWrapper.model [1] should get it, so I’m not sure what’s going > on. If you can’t figure it out open a bug and I’ll have a look when I have > time. > > Thanks. > > [1] > public function get model():Object > { > if (_model == null) > { > // addbead will set _model > addBead(new (ValuesManager.valuesImpl.getValue(this, > "iBeadModel")) as IBead); > } > return _model; > } > > From: Alex Harui<mailto:[email protected]> > Sent: Thursday, March 12, 2020 8:21 PM > To: [email protected]<mailto:[email protected]> > Subject: Re: Trying to load external SVG with sag:Image > > It might be that the CSS that specifies a ClassReference for the model is > not in the defaults.css of the SWCs. I couldn't find it on a quick look, > but didn't check the class hierarchy for svg:Image. > > HTH, > -Alex > > On 3/12/20, 9:08 AM, "Carlos Rovira" <[email protected]> wrote: > > Hi, > > I'm trying to load a SVG external image. > > <svg:Image src="assets/some-image.svg" width="300" height="500"/> > > > I get > > HTMLElementWrapper.as:172 Uncaught TypeError: m is not a constructor > at > > org.apache.royale.svg.Image.org.apache.royale.core.HTMLElementWrapper.get__model > (HTMLElementWrapper.as:172) > at > org.apache.royale.svg.Image.org.apache.royale.core.ImageBase.set__src > (ImageBase.as:70) > at > > Function.org.apache.royale.utils.MXMLDataInterpreter.initializeStrandBasedObject > (MXMLDataInterpreter.as:232) > at > Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray > (MXMLDataInterpreter.as:157) > at > > Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances > (MXMLDataInterpreter.as:337) > at org.apache.royale.jewel.Group.addedToParent (Group.as:93) > at > > org.apache.royale.jewel.supportClasses.card.CardPrimaryContent.org.apache.royale.core.UIBase.addElement > (UIBase.as:1166) > at > > org.apache.royale.jewel.supportClasses.card.CardPrimaryContent.org.apache.royale.jewel.supportClasses.group.GroupBase.addElement > (GroupBase.js:165) > at > > Function.org.apache.royale.utils.MXMLDataInterpreter.initializeStrandBasedObject > (MXMLDataInterpreter.as:307) > at > Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray > (MXMLDataInterpreter.as:157) > > Maybe I'm doing something wrong? > > Thanks > > > -- > Carlos Rovira > > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cfffdd1096c7744a5525808d7c69f9d94%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637196261159282792&sdata=KmY2LYmIYPP4r%2BWiBajHwEFjgbohsyXO7CwixT1kxZ4%3D&reserved=0 > > > -- Carlos Rovira http://about.me/carlosrovira
