Переглянути джерело

Rename property

customisations
alemart 10 місяці тому
джерело
коміт
97f4c5f87a

+ 2
- 2
docs/api/trackable-pointer.md Переглянути файл

@@ -64,8 +64,8 @@ The elapsed time, in seconds, since the tracking of this pointer began.
64 64
 
65 65
 Whether or not this is the primary pointer among all pointers of this [type](#type). A typical primary pointer is that of a finger that touches the screen when no other fingers are touching it.
66 66
 
67
-### type
67
+### kind
68 68
 
69
-`pointer.type: string, read-only`
69
+`pointer.kind: string, read-only`
70 70
 
71 71
 The type of device that originated this pointer. Typically `"touch"`, `"mouse"` or `"pen"`.

+ 2
- 2
src/trackers/pointer-tracker/pointer-tracker.ts Переглянути файл

@@ -276,11 +276,11 @@ export class PointerTracker implements Tracker
276 276
             const isPrimary = event.isPrimary;
277 277
 
278 278
             // determine the type of the originating device
279
-            const type = event.pointerType;
279
+            const kind = event.pointerType;
280 280
 
281 281
             // we create new trackable instances on each frame;
282 282
             // these will be exported and consumed by the user
283
-            this._newPointers.set(id, { id, phase, position, deltaPosition, initialPosition, velocity, elapsedTime, isPrimary, type });
283
+            this._newPointers.set(id, { id, phase, position, deltaPosition, initialPosition, velocity, elapsedTime, isPrimary, kind });
284 284
 
285 285
         }
286 286
 

+ 1
- 1
src/trackers/pointer-tracker/trackable-pointer.ts Переглянути файл

@@ -63,5 +63,5 @@ export interface TrackablePointer extends Trackable
63 63
     readonly isPrimary: boolean;
64 64
 
65 65
     /** the type of the originating device; typically "mouse", "touch" or "pen" */
66
-    readonly type: string;
66
+    readonly kind: string;
67 67
 }

Завантаження…
Відмінити
Зберегти