Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'isDragging' of undefined #55

Open
klochko7 opened this issue Jul 1, 2020 · 6 comments
Open

Cannot read property 'isDragging' of undefined #55

klochko7 opened this issue Jul 1, 2020 · 6 comments

Comments

@klochko7
Copy link

klochko7 commented Jul 1, 2020

Good day! I install [email protected] to my Ionic 5.1.1 project and see such error Cannot read property 'isDragging' of undefined.

main-es2015.37eb728e495d1fcd6056.js:1 ERROR TypeError: Cannot read property 'isDragging' of undefined
at a.get isDragging [as isDragging] (main-es2015.37eb728e495d1fcd6056.js:1)
at Object.updateRenderer (main-es2015.37eb728e495d1fcd6056.js:1)
at Object.updateRenderer (main-es2015.37eb728e495d1fcd6056.js:1)
at Nl (main-es2015.37eb728e495d1fcd6056.js:1)
at Ul (main-es2015.37eb728e495d1fcd6056.js:1)
at zl (main-es2015.37eb728e495d1fcd6056.js:1)
at Nl (main-es2015.37eb728e495d1fcd6056.js:1)
at Ul (main-es2015.37eb728e495d1fcd6056.js:1)
at zl (main-es2015.37eb728e495d1fcd6056.js:1)
at Nl (main-es2015.37eb728e495d1fcd6056.js:1)

any ideas?

@drozhzhin-n-e
Copy link
Owner

@klochko7 Try to get the code from this repository. Do you face the same problem?

@jarnstadt
Copy link

@klochko7 Facing the same issue under angular 8 and the latest version available in npm.

@kaustubhnj
Copy link

@jarnstadt Are you using any conditional statement on the img tag?

@jarnstadt
Copy link

@kaustubhnj yes I do.

@kaustubhnj
Copy link

@jarnstadt
I was facing similar issue.
The condition needs to be checked at the level of tag.
<pinch-zoom *ngIf="condition">

Worked for me.

@mayankkataria
Copy link

mayankkataria commented Oct 21, 2020

I have no condition and this problem is still arising. Instead of img, I have div tag inside pinch-zoom with hidden attribute and ngfor directive. I tried to move them to pinch zoom and it disappeared.
I'm trying to zoom text blocks on canvas with pinch gesture. I already have one mousedown event for drawing purpose. So whenever I'm trying to pinch, a sketch is drawn.
Here's my code for pinch-zoom -

<pinch-zoom>
    <!-- textblocks -->
    <div [hidden]="textModalOpened" *ngFor="let textBlock of TEXT_BLOCKS">
      <div id="t1" class="text text1 ion-text-center" (touchstart)="textTouched($event)" (mousedown)="textTouched($event)"
        (touchmove)="textMoved($event, textBlock)" (mousemove)="textMoved($event, textBlock)"
        (touchend)="textUntouched($event, textBlock)" (mouseup)="textUntouched($event, textBlock)" style="
      top: {{ textBlock.position.y }}px;
      left: {{ textBlock.position.x }}px;
      font-family: {{ textBlock.fontFamily }};
      font-size: {{ textBlock.overDelete ? 10 : textBlock.fontSize }}px;
      color: {{ textBlock.color }};
      width: {{ textBlock.overDelete ? 70 : textBlock.width }}px;
      height: {{ textBlock.overDelete ? 70 : textBlock.height }}px;
      ">
        {{ textBlock.text }}
      </div>
    </div>
  </pinch-zoom>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants