[Seaside-dev] WABuilder and Render Context

Johan Brichau johan at inceptive.be
Sat Aug 30 16:00:37 UTC 2014


On 25 Aug 2014, at 23:48, Maximilian Bareis <max.bareis at me.com> wrote:

>> 
> as I answered to Esteban, the creation of SVGAnchor depends on the state of the context. If the context has the state disableSVGAnchor the disabledAnchor is created otherwise the SVGAnchor is created. Why the disabled state is coupled to the context is beyond my knowledge, this needs to be answered by Johan or the creator of SVGCanvas>>anchor: 

I’m not the creator of the package and it’s been some years ago I actually looked at its code.
From looking at the code, it seems the anchors are being disabled when the svg is being exported to a file. 

I’m not sure if this is a technical requirement or a convenience to prevent urls from a seaside app being exported to a file (which does not make sense).

If Holger (the original author) is still following this list, he might be able to comment…

> If you think you do not need this feature in WABuilder I will subclass it to SVGBuilder.

I’m not sure. You should have access to the renderContext from within your test and set the disabledAnchor flag without changing code to WABuilder.

I don’t understand the necessity to add an ability to put in your own rendercontext because:
- you are still using a WARenderContext instance
- you can manipulate the instance after constructing it:

	WAHtmlCanvas builder render: [ :html |
		html context disableSVGAnchors: true.
		….]

Would the above not be sufficient (and avoid other refactorings?)

Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140830/9958e115/attachment.htm


More information about the seaside-dev mailing list