flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ent <p...@adobe.com>
Subject Re: Changed svg namespace
Date Tue, 26 Jul 2016 21:32:24 GMT
I wasn't really too sure about the resize thing either with getBBox which
sometimes wasn't returning any value. That is a mystery a bit to me, too,
but I got it to work. I think if you have a complete picture of what you
want (API-wise), then I can adapt and redo things. Basically,
DecrementButtonView wants to have a downward arrowhead in a box, however
that's achieved.

—peter

On 7/26/16, 5:10 PM, "Harbs" <harbs.lists@gmail.com> wrote:

>Well, the whole drawRect() method seemed redundant to me along with the
>need to specify the width and height. I tried to remove it and move the
>logic to the draw() method (sans the width and height, and I ran into the
>following code in DecrementButtonView: 			_backRect.drawRect(0, 0,
>host.width, host.height); I was assuming that there’s a reason the host
>width and height is being specified instead of the _backRect ones.
>
>I also have no idea what this was about: resize(x, y, _rect['getBBox']());
>
>If this can all be simplified, I’d be happy to do so, but I thought
>there’s things going on here that I don’t completely understand.
>
>I’m not understanding why a Rect needs to wrap the svg. Why can’t it just
>be a pure rect element and be required to be added to an svg or g element?
>
>On Jul 26, 2016, at 11:55 PM, Peter Ent <pent@adobe.com> wrote:
>
>> I actually just followed some examples from Om. We have our element as
>>the
>> root of a component which would be the <svg>. This is positioned and so
>> anything drawn in it would start a (0,0). So to me, this makes sense for
>> how it is being done at the moment.
>> 
>> ‹peter
>> 
>> On 7/26/16, 3:52 PM, "Harbs" <harbs.lists@gmail.com> wrote:
>> 
>>> Internally, it¹s always setting it to 0,0. It looks to me like some
>>> renderers might be doing some relative positioning, but I did not study
>>> them well enough to figure it out.
>>> 
>>> I think it was in charts, so Peter should probably have a better idea.
>>> 
>>> On Jul 26, 2016, at 10:41 PM, Alex Harui <aharui@adobe.com> wrote:
>>> 
>>>> 
>>>> 
>>>> On 7/26/16, 11:47 AM, "Harbs" <harbs.lists@gmail.com> wrote:
>>>> 
>>>>> I agree there should be a Group object.
>>>>> 
>>>>> The problem is that the way the classes are currently constructed is
>>>>> that
>>>>> 100 pixel ³Rect" positioned at 100,100 actually contains the
>>>>>following
>>>>> markup: <svg x=³100² y=³100"><rect x=³0² y=³0² width=³100²
>>>>> height=³100²/></svg>
>>>> 
>>>> Are you saying that code is doing relative positioning re-calculation?
>>>> I
>>>> would wonder why it does that.  Otherwise, a more straightforward
>>>> mapping
>>>> would make sense.
>>>> 
>>>> -Alex
>>>> 
>>> 
>> 
>

Mime
View raw message