| 544 | @returns {bool} true if anything is changed |
| 545 | */ |
| 546 | _updateHandlers(nextProps: MapboxProps, currProps: MapboxProps): boolean { |
| 547 | const map = this._map; |
| 548 | let changed = false; |
| 549 | for (const propName of handlerNames) { |
| 550 | const newValue = nextProps[propName] ?? true; |
| 551 | const oldValue = currProps[propName] ?? true; |
| 552 | if (!deepEqual(newValue, oldValue)) { |
| 553 | changed = true; |
| 554 | if (newValue) { |
| 555 | map[propName].enable(newValue); |
| 556 | } else { |
| 557 | map[propName].disable(); |
| 558 | } |
| 559 | } |
| 560 | } |
| 561 | return changed; |
| 562 | } |
| 563 | |
| 564 | _onEvent = (e: MapEvent) => { |
| 565 | // @ts-ignore |