Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Zoom over image

Hello! 

 

I'm new developing app. This week I tried to make my first app and it was so easy! 

This app consists of showing an image get it from a static URL. So I made a fetch... easy to do. But now, I have the picture in the fitbit and I want to make zoom/move over the image... The movement to de left, right, up, down works fine, but the problem is with the Zoom in. When I enlarge the picture, appears a margin for the right and the image is cut. 

 

I tried to make the zoom function in two ways: 

  • Setting more width and height...
let img = document.getElementById("myImage");
    width = width + 30;
    height = height + 30;
    img.width = width;
    img.height = height;
  • Transform a g
let demo = document.getElementById("lienzo");
    
    
    scaleX = scaleX + 0.2;
    scaleY = scaleY + 0.2;
    demo.groupTransform.scale.x = scaleX;
    demo.groupTransform.scale.y = scaleY;
<g id="lienzo" pointer-events="visible">
<image id="myImage" width="400" height="300"/>
  </g>

 

But with two cases the image is cut for the right... But only in the watch! If I test the APP in the simulator it works fine! 


Best Answer
0 Votes
1 REPLY 1

This is a known bug. The watch can't handle images larger than the display properly.

Peter McLennan
Gondwana Software
Best Answer
0 Votes