svgo icon indicating copy to clipboard operation
svgo copied to clipboard

Added attributes to svg.Startview and svg.StartviewUnit

Open countcb opened this issue 8 years ago • 3 comments

Added attributes to svg.Startview and svg.StartviewUnit

Was wondering why these two methods had no way of adding attributes like the others. I hope the changes are ok. If not I can change some things or you can deny the pull request :)

countcb avatar Jul 15 '17 14:07 countcb

StartRaw was meant to handle the arbitrary case.

ajstarks avatar Jul 16 '17 13:07 ajstarks

Hmm. ok. I found it a little bit strange that 3 out of 5 Start methods had the attributes param and only 2 didn't.

Start, Startunit and Startpercent already have the extra attributes. Only Startview and StartviewUnit don't.

I feel that all of them should have them (no harm since the attributes param is optional), otherwise it feels a little bit inconsistent.

But feel free to close this PR if you think different :)

countcb avatar Jul 17 '17 09:07 countcb

@countcb you are right, it is inconsistent, and my (probably) lame attempt at a general solution was StartRaw.

thinking...

ajstarks avatar Jul 17 '17 14:07 ajstarks