Re: [svgwg] Decide what to do with zoom and pan (#56)

> (And only has panning "controls" in that case.)

What do you mean by "controls", @fsoder ? The scroll bars on the window? They don't seem to be tied in to the currentTranslate properties.

Altogether, I'm not seeing any user-facing zoom & pan controls in either Chrome or Firefox.  Pretty sure WebKit is the same. And the value of the attribute (not present, `magnify`, or `disable`) doesn't affect the DOM side.  So I think it's fair to say that the _attribute_ isn't implemented in any meaningful way, other than by exposing the attribute value in the DOM.  And without any user-initiated way to change the values, the event isn't particularly useful, so it's not much of a loss that the event isn't implemented.

But, the [`currentScale` and `currentTranslate` DOM properties](https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__currentScale) _are_ implemented. So, I don't think we can drop them, although we could mark them as deprecated (recommend that authors don't use them).

We also need to clarify how they interact with other ways of setting & getting transformations on the root SVG: the transform property & attribute (which wasn't allowed on `<svg>` elements in SVG 1.1), the SVG view spec, `viewBox`, `getCTM()`, and so on.

We currently have a note:

> The value of the ‘transform’ property does not affect currentScale or currentTranslate.

Which makes sense, because transform property on the outer <svg> applies to the box as a whole, and this properties are applying inside that box, more like a modification of the `viewBox`.  So I would expect them to affect the `getCTM()` results of child contents, similar to how the viewBox does.

Last I checked, some browsers apply an [SVG view transform](https://svgwg.org/svg2-draft/linking.html#SVGFragmentIdentifiersDefinitions) as an external transform (on the outside box of the SVG) and some as an internal transform (to the viewBox-scaled graphics).  I've previously argued that it should behave like a regular `transform` on the root element, but maybe it makes sense to slot it in with the `currentScale` and `currentTranslate` effects. 


-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/56#issuecomment-503717322 using your GitHub account

Received on Wednesday, 19 June 2019 19:37:26 UTC