Constructor
new BaseVisualizer(canvas, options)
- Description:
Erstellt einen neuen Visualizer
- Source:
- Version:
- 1.0
Parameters:
| Name | Type | Description |
|---|---|---|
canvas |
HTMLCanvasElement | Canvas-Element für Rendering |
options |
Object | Konfigurationsoptions |
Members
canvas :HTMLCanvasElement
- Description:
Das Canvas-Element
- Source:
Das Canvas-Element
Type:
- HTMLCanvasElement
config :Object
- Description:
Konfiguration
- Source:
Konfiguration
Type:
- Object
ctx :CanvasRenderingContext2D
- Description:
2D Rendering Context
- Source:
2D Rendering Context
Type:
- CanvasRenderingContext2D
interaction :Object
- Description:
Interaction-State
- Source:
Interaction-State
Type:
- Object
ready :boolean
- Description:
postMessage Communication State
- Source:
postMessage Communication State
Type:
- boolean
viewport :Object
- Description:
Viewport-State (für Zoom/Pan)
- Source:
Viewport-State (für Zoom/Pan)
Type:
- Object
Methods
(protected) canvasToWorld(canvasX, canvasY) → {Object}
- Description:
Utility: Transformiere Canvas-Koordinaten zu World-Koordinaten Beachtet Viewport-Transformation
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
canvasX |
number | |
canvasY |
number |
Returns:
{ x, y } in World-Koordinaten
- Type
- Object
(protected) drawOverlay()
- Description:
Hilfsmethode: Zeichne Overlay (Zoom, Anleitung, etc) Kann von Subklassen aufgerufen oder erweitert werden
- Source:
executeCommand(command)
- Description:
ABSTRACT: Führt ein empfangenes Command aus Muss von Subklassen überschrieben werden
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
command |
Object | Das Command-Objekt |
render()
- Description:
ABSTRACT: Rendert die Visualisierung Muss von Subklassen überschrieben werden
- Source:
resetView()
- Description:
Setzt Zoom und Pan auf Standard-Werte
- Source:
(protected) sendToParent(message)
- Description:
Sendet ein Command an Parent-Window
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
message |
Object | Die Message |
(protected) worldToCanvas(worldX, worldY) → {Object}
- Description:
Utility: Transformiere World-Koordinaten zu Canvas-Koordinaten
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
worldX |
number | |
worldY |
number |
Returns:
{ x, y } in Canvas-Koordinaten
- Type
- Object