|
192 | 192 | this.scene.onPrePointerObservable.add((e, s) => this._handlePointerEventForInteraction(e, s)); |
193 | 193 | } |
194 | 194 |
|
195 | | - public setPointerCapture(pointerId: number, primitive: Prim2DBase): boolean { |
| 195 | + /** |
| 196 | + * Internal method, you should use the Prim2DBase version instead |
| 197 | + */ |
| 198 | + public _setPointerCapture(pointerId: number, primitive: Prim2DBase): boolean { |
196 | 199 | if (this.isPointerCaptured(pointerId)) { |
197 | 200 | return false; |
198 | 201 | } |
|
211 | 214 | return true; |
212 | 215 | } |
213 | 216 |
|
214 | | - public releasePointerCapture(pointerId: number, primitive: Prim2DBase): boolean { |
| 217 | + /** |
| 218 | + * Internal method, you should use the Prim2DBase version instead |
| 219 | + */ |
| 220 | + public _releasePointerCapture(pointerId: number, primitive: Prim2DBase): boolean { |
215 | 221 | if (this._capturedPointers.get(pointerId.toString()) !== primitive) { |
216 | 222 | return false; |
217 | 223 | } |
|
229 | 235 | return true; |
230 | 236 | } |
231 | 237 |
|
232 | | - public isPointerCaptured(pointerId: number) { |
| 238 | + /** |
| 239 | + * Determine if the given pointer is captured or not |
| 240 | + * @param pointerId the Id of the pointer |
| 241 | + * @return true if it's captured, false otherwise |
| 242 | + */ |
| 243 | + public isPointerCaptured(pointerId: number): boolean { |
233 | 244 | return this._capturedPointers.contains(pointerId.toString()); |
234 | 245 | } |
235 | 246 |
|
|
388 | 399 | } |
389 | 400 | } |
390 | 401 |
|
391 | | - private _notifDebugMode = true; |
| 402 | + private _notifDebugMode = false; |
392 | 403 | private _debugExecObserver(prim: Prim2DBase, mask: number) { |
393 | 404 | if (!this._notifDebugMode) { |
394 | 405 | return; |
|
616 | 627 | this._background.levelVisible = true; |
617 | 628 | } |
618 | 629 |
|
| 630 | + /** |
| 631 | + * Enable/Disable interaction for this Canvas |
| 632 | + * When enabled the Prim2DBase.pointerEventObservable property will notified when appropriate events occur |
| 633 | + */ |
619 | 634 | public get interactionEnabled(): boolean { |
620 | 635 | return this._interactionEnabled; |
621 | 636 | } |
|
0 commit comments