MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / canStart

Method canStart

core/src/components/menu/menu.tsx:557–569  ·  view source on GitHub ↗
(detail: GestureDetail)

Source from the content-addressed store, hash-verified

555 }
556
557 private canStart(detail: GestureDetail): boolean {
558 // Do not allow swipe gesture if a modal is open
559 const isModalPresented = !!document.querySelector('ion-modal.show-modal');
560 if (isModalPresented || !this.canSwipe()) {
561 return false;
562 }
563 if (this._isOpen) {
564 return true;
565 } else if (menuController._getOpenSync()) {
566 return false;
567 }
568 return checkEdgeSide(window, detail.currentX, this.isEndSide, this.maxEdgeStart);
569 }
570
571 private onWillStart(): Promise<void> {
572 this.beforeAnimation(!this._isOpen, GESTURE);

Callers 1

connectedCallbackMethod · 0.95

Calls 3

canSwipeMethod · 0.95
checkEdgeSideFunction · 0.85
_getOpenSyncMethod · 0.65

Tested by

no test coverage detected