Home

# Class goog.graphics.Element

Base class for a thin wrapper around the DOM element returned from the different draw methods of the graphics. You should not construct objects from this constructor. The graphics will return the object for you.

extends goog.events.EventTarget

Instance Method Summary

`addEventListener(string type, ?Object handler, boolean= opt_capture, ?Object= opt_handlerScope)`

Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched. Supported for legacy but use goog.events.listen(src, type, handler) instead.

`disposeInternal()`

Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this:

    MyClass.prototype.disposeInternal = function() {
    MyClass.superClass_.disposeInternal.call(this);
    // Dispose logic for MyClass
    };

| `getElement() ⇒ ?Element` Returns the underlying object.
| `getGraphics() ⇒ ?goog.graphics.AbstractGraphics` Returns the graphics.
| `getTransform() ⇒ ?goog.graphics.AffineTransform`
| `removeEventListener(string type, ?Object handler, boolean= opt_capture, ?Object= opt_handlerScope)` Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.
| `setTransformation(number x, number y, number rotate, number centerX, number centerY)` Set the transformation of the element.