- From: Ievgen Naida via GitHub <sysbot+gh@w3.org>
- Date: Thu, 09 Apr 2020 09:42:27 +0000
- To: public-svg-issues@w3.org
ievgennaida has just created a new issue for https://github.com/w3c/svgwg: == Question: getPathData() should expand shorthand notation by default? == I am having a discussion on a getPathData specification and there two different opinions. https://svgwg.org/specs/paths/#InterfaceSVGPathData Maybe a clear statement in the documentation is required to define the next case. Imagine we are having 3 segments defined like that: M 10 10 L 10 10 10 10 In my opinion, getPathData should return two commands: - type: M values: 10 10 - type L values: 10 10 10 10 Reasons: - The browser should not simplify the initial data by default and consumers might need to know how the path was really defined. - When data is fetched and saved invariant principle will remain, so it will be possible to save again the same sequence: M 10 10 L 10 10 10 10 that is not a case when 3 commands are returned (unless browser will always use the shorthand notation). Another opinion that really 3 segments should be returned: - type: M values: 10 10 - type L values: 10 10 - type L values: 10 10 Arguments: - Simpler to operate, it's not a normalization it's expanding of the same shorthand notation - while the type name "SVGPathSegment" and not a "command" than it's should be 3 segments and not 2 commands. Please give your opinion on this, Thanks for the answer. Please view or discuss this issue at https://github.com/w3c/svgwg/issues/789 using your GitHub account
Received on Thursday, 9 April 2020 09:42:29 UTC