New to Kendo UI for Vue? Start a free 30-day trial
An abstract class representing the top-level drawing surface. Cannot be directly instantiated.
Specific implementations are created through the static create method. The implementations for SVG and Canvas inherit from this base class.
()
|  | 
|---|
| Binds to an event on the Surface. | 
| | Parameters |  |  | 
|---|
 | eventName | 
SurfaceEventName | The name of the event to bind to. |  | handler | 
(e: any) => void | The event handler. | 
 | 
| | Returns |  | 
|---|
 | 
Surface | 
The current Surface instance to allow chaining. | 
 | 
|  | 
|---|
| Clears the drawing surface. | 
|  | 
|---|
| Creates a drawing surface that matches the browser capabilities. | 
| | Parameters |  |  | 
|---|
 | element | 
HTMLElement | The DOM element that will host the surface. |  | options? | 
SurfaceOptions | The configuration options for the surface. | 
 | 
| | Returns |  | 
|---|
 | 
Surface | 
The newly created surface instance. | 
 | 
|  | 
|---|
| Releases the resources allocated by this instance. 
The DOM elements will not be cleared. | 
|  | 
|---|
| Draws the element and its children on the surface. Existing elements are not affected. | 
| | Parameters |  |  | 
|---|
 | element | 
Element | The element to draw. | 
 | 
|  | 
|---|
| Returns the target drawing element of a DOM event. | 
| | Parameters |  |  | 
|---|
 | e | 
any | The original DOM event object. | 
 | 
| | Returns |  | 
|---|
 | 
Element | 
The target drawing element, if any. | 
 | 
|  | 
|---|
| Binds to an event once. The handler will be unbound after the first event fires. | 
| | Parameters |  |  | 
|---|
 | eventName | 
SurfaceEventName | The name of the event to bind to. |  | handler | 
(e: any) => void | The event handler. | 
 | 
| | Returns |  | 
|---|
 | 
Surface | 
The current Surface instance to allow chaining. | 
 | 
|  | 
|---|
| Resizes the surface to match the size of the container. | 
| | Parameters |  |  | 
|---|
 | force? | 
boolean | Whether to proceed with resizing even if the container dimensions are not changed. | 
 | 
|  | 
|---|
| Unbinds an event handler. | 
| | Parameters |  |  | 
|---|
 | eventName | 
SurfaceEventName | The name of the event to bind to. |  | handler? | 
(e: any) => void | The event handler. | 
 | 
| | Returns |  | 
|---|
 | 
Surface | 
The current Surface instance to allow chaining. | 
 |