
6 Feb
2014
6 Feb
'14
2:44 p.m.
Hi,
A heads-up...
While mucking about the code I noticed that the same basic code to handle viewBox and preserveAspectRatio appeared in multiple files (8 times?) having originally been pasted directly or copied with some changes. Overtime the code was tweaked here and there.
I have created a new base class to handle viewBox and preserveAspectRatio and modified sp-root, sp-symbol, sp-image, sp-pattern, and marker to use the new class, resulting in a reduction of over 400 lines of code (yeah!). In the process, I've fixed a number of issues with using percentage based x, y, width, and height values.
Please let me know if you find any problems.
Tav