- From: Robert Longson <longsonr@gmail.com>
- Date: Sun, 21 Aug 2016 22:07:10 +0100
- To: www-svg@w3.org
- Message-ID: <CAOu7Uv5mtWS2cFVrOGOA4XswoWAigFs8+XsGmX+LPdkWtCF8=Q@mail.gmail.com>
SVG 2 has this webidl definition of SVGZoomAndPan
[NoInterfaceObject]
interface *SVGZoomAndPan* {
// Zoom and Pan Types
const unsigned short SVG_ZOOMANDPAN_UNKNOWN
<https://www.w3.org/TR/SVG2/types.html#__svg__SVGZoomAndPan__SVG_ZOOMANDPAN_UNKNOWN>
= 0;
const unsigned short SVG_ZOOMANDPAN_DISABLE
<https://www.w3.org/TR/SVG2/types.html#__svg__SVGZoomAndPan__SVG_ZOOMANDPAN_DISABLE>
= 1;
const unsigned short SVG_ZOOMANDPAN_MAGNIFY
<https://www.w3.org/TR/SVG2/types.html#__svg__SVGZoomAndPan__SVG_ZOOMANDPAN_MAGNIFY>
= 2;
attribute unsigned short zoomAndPan
<https://www.w3.org/TR/SVG2/types.html#__svg__SVGZoomAndPan__zoomAndPan>;
};
Without the NoInterfaceObject one could write something like
if (element.zoomAndPan == SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE)
While one now has to write it as
if (element.zoomAndPan == SVGSVGElement.SVG_ZOOMANDPAN_DISABLE)
The same applies to SVGUnitTypes. Do we mind about keeping backwards
compatibility with any existing usages like this. We found when making
this change that our own unit tests fail on SVGUnitTypes usage for
instance.
Robert
Received on Sunday, 21 August 2016 21:07:39 UTC