Skip to content

SVGGroup

Overview

Poolable wrapper for SVG <group> elements. We store state and add listeners directly to the corresponding Node, so that we can set dirty flags and smartly update only things that have changed. This takes a load off of SVGBlock.

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class SVGGroup

import { SVGGroup } from 'scenerystack/scenery';

Constructor

new SVGGroup( block, instance, parent )

Instance Methods

initialize( block, instance, parent )

@public

@param {SVGBlock} block @param {Block} instance @param {SVGGroup|null} parent

addSelfDrawable( drawable )

@private

@param {SelfDrawable} drawable

removeSelfDrawable( drawable )

@private

@param {SelfDrawable} drawable

addChildGroup( group )

@private

@param {SVGGroup} group

removeChildGroup( group )

@private

@param {SVGGroup} group

markDirty()

@public

markOrderDirty()

@public

markTransformDirty()

@public

onFilterChange()

@private

onVisibleChange()

@private

onClipChange()

@private

update()

@public

isReleasable()

@private

@returns {boolean}

dispose()

Releases references @public

toString()

Returns a string form of this object @public

@returns {string}

Static Methods

addDrawable( block, drawable )

@public

@param {SVGBlock} block @param {Drawable} drawable

removeDrawable( block, drawable )

@public

@param {SVGBlock} block @param {Drawable} drawable

ensureGroupsToInstance( block, instance )

@private

@param {SVGBlock} block @param {Instance} instance @returns {SVGGroup}

releaseGroupsToInstance( block, instance )

@private

@param {SVGBlock} block @param {Instance} instance

Source Code

See the source for SVGGroup.js in the scenery repository.