Module: roundspan

圆环进度控制(多条件)
Implements:
Source:
See:

Example

<link href='../res/default/style.css' rel='stylesheet' />
<div style="margin-top: 20px; margin-left: 150px; ">
    <div class="comp-rs" 
        data-comp="RoundSpan"
        data-offset_angle="210"
        data-max_angle="240"
        data-value="11,29"
        data-min_value="6"
        data-max_value="34"
        data-order="1"
        >
        <div class="comp-rs-control" data-control="point" ><label data-type="text"></label></div>
        <div class="comp-rs-control" data-control="point" ><label data-type="text"></label></div>
    </div>
</div>
<script>
    requirejs( [ 'v.roundspan' ], function( RoundSpan ){
        RoundSpan.trigger( RoundSpan.init );
    });
</script>

Requires

Namespaces

update

Events


beforeDragCheckEvent

圆点拖动时检测是否可以拖动
Source:
Returns:
Type
boolean
Example
<div class="temp-circle isRoomItem" data-comp="RoundSpan" data-offset_angle="210" data-max_angle="240" data-value="17,24" data-min_value="5" data-max_value="35" data-room_num="3" data-order="1" data-before_drag_check_event="customEvent">
     <span class="temp-high" data-control="point" data-type="lower" data-point_value="17" style="z-index: 101; left: 10.9731px; top: -13.8172px;">
         <label data-type="text">17</label>
     </span>
     <span class="temp-low" data-control="point" data-type="upper" data-point_value="24" style="z-index: 102; left: 50.8223px; top: -10.3988px;">
         <label data-type="text">24</label>
     </span>
     <div class="temp-hidden"></div>
 </div>
 <script>
    V.WIN.on( 'customEvent', function( _evt, _src, _params ){
        return window.isCanDrag;
    });
 </script>

init

初始化圆环
Parameters:
Name Type Description
_wrapper selector 要初始化的复选框
_isItem boolean 声明 _wrapper 是否为单个组件, 否则初始化 _wrapper 下的所有 RoundSpan, default: false
Source:
Example
RoundSpan.trigger( RoundSpan.init, [ 'body' ]  )
//RoundSpan.trigger( RoundSpan.init, [ $( 'div[data-comp=RoundSpan]', true ) ]  )

initItem

初始化单个圆环
Parameters:
Name Type Description
_item selector 要初始化的圆环
Source:
Example
RoundSpan.trigger( RoundSpan.initItem, [ 'div[data-comp=RoundSpan]:first' ]  )