Svg element | SVGSVGElement object Chinese Document (events, methods, attributes)

Source: Internet
Author: User

Composition:

TheSVGElementObjects have members of these types:

  • Events event
  • Methods Method
  • Properties
Event

TheSVGElementThe object contains the following events.

Event Description
Click

Triggered when you click the left mouse button on the current object.

NoteStarting with IE11, this event firesMSPointerEventObject insteadMouseEvent. You can use the MouseEvent.PointerTypeProperty to determine the type of contact that the click originated from (touch, mouse, or pen ).

Dblclick

This is triggered when you double-click the left mouse button on the current object.

NoteStarting with IE11, this event firesMSPointerEventObject instead ofMouseEvent. You can use the MouseEvent.PointerTypeProperty to determine the type of contact that the click originated from (touch, mouse, or pen ).

Focusin

Triggered before the current object is set to focus.

Focusout

Triggered immediately when focus is transferred.

Load

Triggered when the current object is loaded.

Mousedown

Triggered when the mouse is pressed down on the current object.

Mousemove

Triggered when you move the mouse over the current object.

Mouseout

Triggered when the user moves the mouse over the boundary of the current object.

Mouseover

Triggered when you move the cursor to the current object range.

Mouseup

It is triggered when the user clicks "release" on the current object (that is, when the mouse is started ).

Onabort

Triggered when the image is stopped before it is loaded.

Onerror

Triggered when an element is incorrectly loaded or the script is running incorrectly.

Onload

Triggered when the browser has completely parsed all elements and all its child nodes.

Onresize

Triggered when the size of the document view changes.

Onscroll

Triggered when the document view is moved along the X, Y, or X, Y axis simultaneously.

Onunload

Triggered when the document is removed from windows or frame.

Onzoom

When the document scaling level orCurrentScaleIs triggered when the attribute of is changed.

 

Method

TheSVGElementThe object contains the following methods.

Method Description
AnimationsPaused

Determines whether the SVG file segment is paused. (True: paused; otherwise, false .)

CheckEnclosure

Determines whether the element exceeds the specified rectangle range. (True: the value is not out of the range. Otherwise, false .)

CheckIntersection

Determines whether an element is at the intersection of a specified rectangle.

CreateEvent

Creates an event object to be used in conjunction withDispatchEventMethod.

CreateSVGAngle

Creates a newSVGAngleObject that does not have units, that is set to 0 degrees, and that is not attached to any document.

CreateSVGLength

Creates a newSVGLengthObject that has a length of 0 user units.

CreateSVGMatrix

Creates a newSVGMatrixObject that is set to the identity matrix and that is not attached to any document.

CreateSVGNumber

Creates a newSVGNumberObject that has a value of zero and that is not attached to any document.

CreateSVGPoint

Creates a newSVGPointObject that is initialized to the point (0, 0) in the user coordinate system and that is not attached to any document.

CreateSVGRect

Creates a newSVGRectObject that has all values set to 0 user units and that is not attached to any document.

CreateSVGTransform

Creates a newSVGTransformObject that is set to the identity matrix and that is not attached to any document.

CreateSVGTransformFromMatrix

Creates a matrix transform object whose values are given by the specified matrix.

DeselectAll

Cancels the selection of any selected objects, including any selections of text strings and text boxes.

ForceRedraw

Redraws all regions of the viewport that require updating.

GetBBox

Gets the bounding box, in current user space, of the geometry of all contained graphics elements.

GetComputedStyle

Returns the current computed value of the combined CSS properties for an element.

GetCTM

Gets the transformation matrix that transforms from the current user units to the viewport coordinate system forNearestViewportElementObject.

GetCurrentTime

Gets the current time, in seconds, relative to the start time for the current SVG document fragment.

GetElementById

Gets the element that matches the specified ID from the SVG document or document fragment.

GetEnclosureList

Gets the list of graphics elements whose rendered content is entirely contained within the specified rectangle.

GetIntersectionList

Gets the list of graphics elements whose rendered content intersects the specified rectangle.

GetScreenCTM

Gets the transformation matrix from the current user units to the screen coordinate system.

GetTransformToElement

Gets the transformation matrix that transforms from the user coordinate system on the current element to the user coordinate system on the specified target element.

HasExtension

Determines if the specified extension is supported.

PauseAnimations

Pauses all currently running animations that are defined within the SVG document fragment that corresponds to thisSvgElement.

SetCurrentTime

Sets the new current time for this SVG document fragment.

SuspendRedraw

Suspends redrawing a device for a specified duration.

UnpauseAnimations

Resumes currently running animations that are defined within the SVG document fragment.

UnsuspendRedraw

Cancels the specified pause repainting operation.

UnsuspendRedrawAll

Cancels all currently active suspensions of redrawing operations.

 

Properties

TheSVGSVGElementObject has these properties.

Property Description

ClassName

Gets the names of the classes that are assigned to this object.

ClipPath

Sets or retrieves a reference to the SVG graphical object that will be used as the clipping path.

ContentScriptType

Gets the default scripting language of the current document fragment.

ContentStyleType

Gets the default style sheet language of the current document.

CurrentScale

Gets or sets the current scale factor, relative to the initial view (when this property is called from an outermostSvgElement.

CurrentTranslate

Gets or sets the current translation factor, relative to the initial view (when this property is called from an outermostSvgElement ).

CurrentView

 

ExternalResourcesRequired

Gets a value that indicates whether referenced resources that are not in the current document are required to correctly render a given element.

FarthestViewportElement

Gets a value that represents the farthest ancestorSvgElement.

Focusable

Determines if an element can acquire keyboard focus (that is, receive keyboard events) and be a target for field-to-field navigation actions (such as when a user presses the Tab key ).

Height

Defines the height of an element.

Mask

Sets or retrieves a value that indicates a SVG mask.

NearestViewportElement

Gets a value that indicates which element established the current viewport.

OwnerSVGElement

Gets the nearest ancestorSvgElement.

PixelUnitToMillimeterX

Gets or sets the size of a pixel unit along the x-axis of the viewport.

PixelUnitToMillimeterY

Gets or sets the size of a pixel unit along the y-axis of the viewport.

PreserveAspectRatio

Gets an XML value that indicates whether to force uniform graphic scaling.

RequiredExtensions

Gets a white space-delimited list of required language extensions.

RequiredFeatures

Gets or sets a white space-delimited list of feature strings.

ScreenPixelToMillimeterX

Gets or sets the size of a screen pixel along the x-axis of the viewport.

ScreenPixelToMillimeterY

Gets or sets the size of a screen pixel along the y-axis of the viewport.

Style

ObtainStyleObject.

SystemLanguage

Obtain or set a group of language names by using commas.

Usecurityview

Gets or sets a value that indicates whether the current innermost SVG document fragment isStandard view(That is, based on attributes ofSvgElement suchViewBox) OrCustom view(That is, a hyperlink into a participant view or other element.

ViewBox

Gets a value that indicates how a graphic scales to fit a container element.

Viewport

Obtain or set the current viewport.

ViewportElement

Gets the element that established the current viewport.

Width

Defines the width of an element.

X

Obtain or set the X axis coordinate value.

Xmlbase

Obtains or sets the basic attributes of an element.

Xmllang

Gets or sets the language attributes of an element.

Xmlspace

Gets or sets a value that indicates whether white space is preserved in character data.

Y

Obtains or sets the Y axis coordinate value.

ZoomAndPan

Obtains the zoom/PAN attribute element.

 

Standard Information
  • Scalable Vector Graphics: Document Structure, Section 5.11.2

 

Address: http://msdn.microsoft.com/library/ff972122.aspx

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.