瀏覽代碼

Add CanvasSource.canvas

customisations
alemart 2 月之前
父節點
當前提交
14cf49d01d
共有 2 個文件被更改,包括 19 次插入1 次删除
  1. 11
    1
      docs/api/canvas-source.md
  2. 8
    0
      src/sources/canvas-source.ts

+ 11
- 1
docs/api/canvas-source.md 查看文件

16
 
16
 
17
 **Returns**
17
 **Returns**
18
 
18
 
19
-A new source of data.
19
+A new source of data.
20
+
21
+## Properties
22
+
23
+### canvas
24
+
25
+`source.canvas: HTMLCanvasElement, read-only`
26
+
27
+The underlying `<canvas>` element.
28
+
29
+*Since:* 0.4.4

+ 8
- 0
src/sources/canvas-source.ts 查看文件

52
     }
52
     }
53
 
53
 
54
     /**
54
     /**
55
+     * The underlying <canvas> element
56
+     */
57
+    get canvas(): HTMLCanvasElement
58
+    {
59
+        return this._canvas;
60
+    }
61
+
62
+    /**
55
      * A type-identifier of the source of data
63
      * A type-identifier of the source of data
56
      * @internal
64
      * @internal
57
      */
65
      */

Loading…
取消
儲存