Giter Club home page Giter Club logo

Comments (6)

drozhzhin-n-e avatar drozhzhin-n-e commented on August 11, 2024

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

from ngx-pinch-zoom.

jarnstadt avatar jarnstadt commented on August 11, 2024

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

from ngx-pinch-zoom.

kaustubhnj avatar kaustubhnj commented on August 11, 2024

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

from ngx-pinch-zoom.

jarnstadt avatar jarnstadt commented on August 11, 2024

@kaustubhnj yes I do.

from ngx-pinch-zoom.

kaustubhnj avatar kaustubhnj commented on August 11, 2024

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

Worked for me.

from ngx-pinch-zoom.

mayankkataria avatar mayankkataria commented on August 11, 2024

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>

from ngx-pinch-zoom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.