The problem of complex data Animation Jitter in Mini Program

the following code uses the translate attribute of css and js monitoring gesture to realize the movement and scaling of the picture. When the data is an array, jitter will appear on the real machine, and it will be normal on the simulator. Please give us your advice.

wxml Code

//  
//
let showDogs = this.data.showDogs;
showDogs[id].partTouchData = partTouchData;

this.setData({
    showDogs: showDogs
  })

the original reason:

let partTouchData = this.data.showDogs[id].partTouchData

perfect solution!

may be bound to complex data through data-, and when fetching it in a loop, it will seriously affect performance.

Menu