web api interface
SVGPreserveAspectRatio
The SVGPreserveAspectRatio interface corresponds to the preserveAspectRatio attribute.
An SVGPreserveAspectRatio object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
Instance properties
align- : The type of the alignment value as specified by one of the
SVG_PRESERVEASPECTRATIO_*constants defined on this interface.
- : The type of the alignment value as specified by one of the
meetOrSlice- : The type of the meet-or-slice value as specified by one of the
SVG_MEETORSLICE_*constants defined on this interface.
- : The type of the meet-or-slice value as specified by one of the
Instance methods
The SVGPreserveAspectRatio interface do not provide any specific methods.
Static properties
SVG_PRESERVEASPECTRATIO_UNKNOWN(0)- : The enumeration was set to a value that is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
SVG_PRESERVEASPECTRATIO_NONE(1)- : Corresponds to value
nonefor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMINYMIN(2)- : Corresponds to value
xMinYMinfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMIDYMIN(3)- : Corresponds to value
xMidYMinfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMAXYMIN(4)- : Corresponds to value
xMaxYMinfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMINYMID(5)- : Corresponds to value
xMinYMidfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMIDYMID(6)- : Corresponds to value
xMidYMidfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMAXYMID(7)- : Corresponds to value
xMaxYMidfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMINYMAX(8)- : Corresponds to value
xMinYMaxfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMIDYMAX(9)- : Corresponds to value
xMidYMaxfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_PRESERVEASPECTRATIO_XMAXYMAX(10)- : Corresponds to value
xMaxYMaxfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_MEETORSLICE_UNKNOWN(0)- : The enumeration was set to a value that is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
SVG_MEETORSLICE_MEET(1)- : Corresponds to value
meetfor attributepreserveAspectRatio.
- : Corresponds to value
SVG_MEETORSLICE_SLICE(2)- : Corresponds to value
slicefor attributepreserveAspectRatio.
- : Corresponds to value
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.