<!--pages/customized/made/madeFont/madeFont.wxml-->

<view class='made-content'>
  <!-- <canvas canvas-id='madeContent' class='made-content'></canvas> -->
  <view class='made-img-box'>
    <image src='{{obverseImgObject[isActive]}}'></image>
    <made-solid prop-position="{{dataPositionObj}}" prop-size="{{propSize}}">
      <view class='f-box f-align-items-center f-justify-content-center made-prompt' style='text-align:center' wx:if="{{!fontTouch.fontSize && !imgTouch.src}}">{{fontTouch.fontContent}}</view>
      <view class='made-box'>
        <!-- img -->
        <view wx:if="{{imgTouch.src}}" class='edit-content' style='top:{{imgTouch.y}}px;left:{{imgTouch.x}}px'>
            <!-- <view class='iconfont icon-guanbi1 c-white icon-close' bindtap='imgDelete'></view> -->
          <view animation="{{imgAnimationData}}">
            <image src="{{imgTouch.src}}" mode="aspectFit" style='width:{{imgTouch.width}}rpx;height:{{imgTouch.height}}rpx'></image>
          </view>
        </view>
        <!-- font -->
        <view wx:if="{{fontTouch.fontSize}}" class='made-prompt made-font' style='color:{{fontTouch.isColor}};font-size:{{fontTouch.fontSize}}px;font-weight:{{fontTouch.bold}};'>
          <view class='font-content' style='top:{{fontTouch.y}}px;left:{{fontTouch.x}}px;' bindtouchstart="fontTouchstart" animation="{{animationData}}" bindtouchmove="fontTouchmove" bindtouchend="fontTouchend">
            <!-- <view class='iconfont icon-guanbi1 c-white icon-close' bindtap='fontDelete'></view> -->
            <view  id='touchFont' style='font-weight:{{fontTouch.bold ? "bold":""}}'>{{fontTouch.fontContent}}</view>
          </view>
        </view>
      </view>
      
    </made-solid>
  </view>
</view>
<view class='public-prompt'>该预览为仿真效果图,具体请以实物为准</view>
<view class='footer'>
<view class='footer-box f-box'>
 <navigator open-type="navigateBack" class="f-box f-align-items-center f-justify-content-center footer-icon">
    <block>
      <icon class='f-box' type="clear" />
    </block>
  </navigator>
  <view class='f-item footer-upload-btn bg-orange c-white' bindtap='fontDelete' style='text-align:center' hover-class="none">清除文字</view>
  <view class='f-item footer-add-btn bg-green c-white' bindtap='addFont'>添加文字</view>
  <view class="f-box f-align-items-center footer-icon f-justify-content-center" bindtap='madeConfirm'>
    <block>
      <icon  class='f-box' color="#00af66" type="success" />
    </block>
  </view>
</view>
 
</view>
<!-- slider -->
<view class='slider-box' wx:if="{{fontTouch.fontSize}}">
<!-- 大小 -->
  <view class='f-box f-align-items-center mar-l20 mar-r20'>
    <view class='f-s30'>放大</view>
    <view class="body-view f-item">
      <slider bindchanging="fontEnlarge" block-color="#00af66" block-size="16" min="20" max="80" value='{{fontTouch.fontSize}}' show-value/>
    </view>
  </view>
  <view class='f-box f-align-items-center mar-l20 mar-r20'>
    <!-- 度数 -->
    <view class='f-s30'>旋转</view>
    <view class="body-view f-item">
      <slider bindchanging="fontRotate" block-color="#00af66" block-size="16" min="0" max="360" value='{{fontTouch.angle}}' show-value/>
    </view>
  </view>
  <!-- <view class='f-box f-align-items-center mar-l20 mar-r20'> -->
    <!-- 加粗 -->
    <!-- <view class='f-s30'>加粗</view>
    <view class="body-view f-item">
      <slider bindchanging="fontWeight" block-color="#00af66" block-size="16" min="100" max="900" value='{{fontTouch.bold}}' show-value/>
    </view> -->
  <!-- </view> -->
  
</view>

<!-- 文字层 -->
<view class='font-ceng' wx:if="{{addFontStatic}}">
  <view class="f-box f-justify-content-between">
    <view class='font-cancel f-s32 c-white mar-l20 mar-t20' bindtap='fontCancel'>取消</view>
    <view class='font-confirm f-s32 c-white mar-r20 mar-t20' bindtap='fontConfirm'>完成</view>
  </view>
  <view class='c-white f-box f-justify-content-center f-s26'>仅支持手机自带字体样式</view>
  <view class="input-box">
    <input placeholder-style="color:#fff" style='color:{{fontTouch.isColor}};font-weight:{{fontTouch.bold? 900:""}}' placeholder="可编辑文字" bindinput="bindinput" auto-focus />
  </view>

  <view class='font-color f-box f-justify-content-around'>
    <view class='select-weight' bindtap='weightBtn' style='color:{{fontTouch.bold ? "#333":""}};background:{{fontTouch.bold ? "#fff":""}}'>粗</view>
    <view wx:for="{{fontColorArray}}" class='{{fontTouch.isColor === item ? "isColor" : ""}}' data-color="{{item}}" bindtap='selectColor'>
      <view style='background:{{item}}' class='font-item'></view>
    </view>
  </view>
</view>