painter.wxml 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <view style='position: relative;{{customStyle}};{{painterStyle}}'>
  2. <block wx:if="{{!use2D}}">
  3. <canvas canvas-id="photo" style="{{photoStyle}};position: absolute; left: -9999px; top: -9999rpx;"/>
  4. <canvas canvas-id="bottom" style="{{painterStyle}};position: absolute;"/>
  5. <canvas canvas-id="k-canvas" style="{{painterStyle}};position: absolute;"/>
  6. <canvas canvas-id="top" style="{{painterStyle}};position: absolute;"/>
  7. <canvas
  8. canvas-id="front"
  9. style="{{painterStyle}};position: absolute;"
  10. bindtouchstart="onTouchStart"
  11. bindtouchmove="onTouchMove"
  12. bindtouchend="onTouchEnd"
  13. bindtouchcancel="onTouchCancel"
  14. disable-scroll="{{true}}"/>
  15. </block>
  16. <block wx:if="{{use2D}}">
  17. <canvas type="2d" id="photo" style="{{photoStyle}};"/>
  18. <!-- <canvas type="2d" id="bottom" style="{{painterStyle}};position: absolute;" />
  19. <canvas type="2d" id="k-canvas" style="{{painterStyle}};position: absolute;" />
  20. <canvas type="2d" id="top" style="{{painterStyle}};position: absolute;" />
  21. <canvas
  22. type="2d"
  23. id="front"
  24. style="{{painterStyle}};position: absolute;"
  25. bindtouchstart="onTouchStart"
  26. bindtouchmove="onTouchMove"
  27. bindtouchend="onTouchEnd"
  28. bindtouchcancel="onTouchCancel"
  29. disable-scroll="{{true}}" /> -->
  30. </block>
  31. </view>