dcim-topology2d 2.2.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/activity-diagram/src/final/final.d.ts +1 -1
 - package/activity-diagram/src/final/final.rect.d.ts +1 -1
 - package/activity-diagram/src/final/final.rect.js +1 -1
 - package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
 - package/activity-diagram/src/fork/fork.anchor.js +1 -1
 - package/activity-diagram/src/fork/fork.d.ts +1 -1
 - package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
 - package/activity-diagram/src/fork/fork.rect.js +1 -1
 - package/activity-diagram/src/register.js +1 -1
 - package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
 - package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
 - package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
 - package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
 - package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
 - package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
 - package/chart-diagram/index.d.ts +1 -3
 - package/chart-diagram/index.js +1 -2
 - package/chart-diagram/src/echarts/index.d.ts +2 -1
 - package/chart-diagram/src/echarts/index.js +104 -112
 - package/chart-diagram/src/register.js +8 -9
 - package/class-diagram/src/class/class.d.ts +1 -1
 - package/class-diagram/src/class/class.rect.d.ts +1 -1
 - package/class-diagram/src/class/class.rect.js +1 -1
 - package/class-diagram/src/register.js +1 -1
 - package/core/index.d.ts +0 -2
 - package/core/index.js +0 -2
 - package/core/src/activeLayer.d.ts +10 -2
 - package/core/src/activeLayer.js +47 -42
 - package/core/src/animateLayer.d.ts +7 -3
 - package/core/src/animateLayer.js +12 -10
 - package/core/src/calling.d.ts +4 -1
 - package/core/src/calling.js +41 -43
 - package/core/src/canvas.d.ts +6 -1
 - package/core/src/canvas.js +21 -22
 - package/core/src/common.d.ts +7 -6
 - package/core/src/common.js +675 -343
 - package/core/src/core.d.ts +4 -5
 - package/core/src/core.js +385 -536
 - package/core/src/divLayer.d.ts +36 -2
 - package/core/src/divLayer.js +305 -33
 - package/core/src/healps/changeData.d.ts +2 -1
 - package/core/src/healps/changeData.js +100 -86
 - package/core/src/hoverLayer.d.ts +9 -2
 - package/core/src/hoverLayer.js +34 -31
 - package/core/src/middles/default.d.ts +3 -1
 - package/core/src/middles/default.js +51 -63
 - package/core/src/middles/index.js +2 -3
 - package/core/src/middles/nodes/arbitrarygraph.js +9 -11
 - package/core/src/middles/nodes/pentagon.rect.js +1 -1
 - package/core/src/middles/nodes/rectangle.rect.js +1 -1
 - package/core/src/models/data.d.ts +26 -0
 - package/core/src/models/data.js +77 -0
 - package/core/src/models/data.js.map +1 -0
 - package/core/src/models/index.d.ts +1 -0
 - package/core/src/models/index.js +1 -0
 - package/core/src/models/line.js +7 -7
 - package/core/src/models/node.d.ts +0 -10
 - package/core/src/models/node.js +101 -148
 - package/core/src/models/pen.js +67 -27
 - package/core/src/models/rect.js +2 -2
 - package/core/src/mqtt.d.ts +14 -0
 - package/core/src/mqtt.js +82 -0
 - package/core/src/mqtt.js.map +1 -0
 - package/core/src/offscreen.d.ts +4 -1
 - package/core/src/offscreen.js +24 -26
 - package/core/src/options.d.ts +1 -3
 - package/core/src/options.js +0 -2
 - package/core/src/poll.js +39 -0
 - package/core/src/preview.d.ts +13 -2
 - package/core/src/preview.js +43 -144
 - package/core/src/renderLayer.d.ts +9 -11
 - package/core/src/renderLayer.js +61 -60
 - package/core/src/socket.d.ts +10 -0
 - package/core/src/socket.js +51 -0
 - package/core/src/socket.js.map +1 -0
 - package/core/src/utils/canvas.js +1 -1
 - package/core/src/utils/construction.d.ts +3 -36
 - package/core/src/utils/construction.js +1 -29
 - package/core/src/utils/conversion.d.ts +0 -15
 - package/core/src/utils/conversion.js +0 -319
 - package/core/src/utils/dom.d.ts +8 -0
 - package/core/src/utils/dom.js +67 -0
 - package/core/src/utils/dom.js.map +1 -0
 - package/core/src/utils/index.d.ts +1 -2
 - package/core/src/utils/index.js +1 -2
 - package/core/src/utils/onmousevent.d.ts +0 -3
 - package/core/src/utils/onmousevent.js +10 -42
 - package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
 - package/flow-diagram/src/comment/comment.anchor.js +1 -1
 - package/flow-diagram/src/comment/comment.d.ts +1 -1
 - package/flow-diagram/src/data/data.anchor.d.ts +1 -1
 - package/flow-diagram/src/data/data.anchor.js +1 -1
 - package/flow-diagram/src/data/data.d.ts +1 -1
 - package/flow-diagram/src/data/data.rect.d.ts +1 -1
 - package/flow-diagram/src/data/data.rect.js +1 -1
 - package/flow-diagram/src/db/db.d.ts +1 -1
 - package/flow-diagram/src/db/db.rect.d.ts +1 -1
 - package/flow-diagram/src/db/db.rect.js +1 -1
 - package/flow-diagram/src/display/display.anchor.d.ts +1 -1
 - package/flow-diagram/src/display/display.anchor.js +1 -1
 - package/flow-diagram/src/display/display.d.ts +1 -1
 - package/flow-diagram/src/display/display.rect.d.ts +1 -1
 - package/flow-diagram/src/display/display.rect.js +1 -1
 - package/flow-diagram/src/document/document.anchor.d.ts +1 -1
 - package/flow-diagram/src/document/document.anchor.js +1 -1
 - package/flow-diagram/src/document/document.d.ts +1 -1
 - package/flow-diagram/src/document/document.rect.d.ts +1 -1
 - package/flow-diagram/src/document/document.rect.js +1 -1
 - package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
 - package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
 - package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
 - package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
 - package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
 - package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
 - package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
 - package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
 - package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
 - package/flow-diagram/src/manually/manually.anchor.js +1 -1
 - package/flow-diagram/src/manually/manually.d.ts +1 -1
 - package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
 - package/flow-diagram/src/manually/manually.rect.js +1 -1
 - package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
 - package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
 - package/flow-diagram/src/parallel/parallel.d.ts +1 -1
 - package/flow-diagram/src/queue/queue.d.ts +1 -1
 - package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
 - package/flow-diagram/src/queue/queue.rect.js +1 -1
 - package/flow-diagram/src/register.js +1 -1
 - package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
 - package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
 - package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
 - package/layout/src/align.d.ts +1 -1
 - package/layout/src/align.js +1 -1
 - package/layout/src/layout.d.ts +1 -1
 - package/layout/src/layout.js +1 -1
 - package/myShape-diagram/{index.js → myShape.js} +1 -4
 - package/package.json +1 -1
 - package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
 - package/sequence-diagram/src/focus/focus.anchor.js +1 -1
 - package/sequence-diagram/src/focus/focus.d.ts +1 -1
 - package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
 - package/sequence-diagram/src/focus/focus.rect.js +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
 - package/sequence-diagram/src/register.js +1 -1
 - package/chart-diagram/src/utils/changeOptions.d.ts +0 -8
 - package/chart-diagram/src/utils/changeOptions.js +0 -267
 - package/chart-diagram/src/utils/conversion.d.ts +0 -19
 - package/chart-diagram/src/utils/conversion.js +0 -560
 - package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
 - package/chart-diagram/src/utils/drawGraphic.js +0 -97
 - package/chart-diagram/src/utils/formatter.d.ts +0 -1
 - package/chart-diagram/src/utils/formatter.js +0 -206
 - package/chart-diagram/src/utils/index.d.ts +0 -5
 - package/chart-diagram/src/utils/index.js +0 -5
 - package/chart-diagram/src/utils/render.d.ts +0 -8
 - package/chart-diagram/src/utils/render.js +0 -219
 - package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
 - package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
 - package/core/src/element/common.d.ts +0 -6
 - package/core/src/element/common.js +0 -63
 - package/core/src/element/datePicker.d.ts +0 -3
 - package/core/src/element/datePicker.js +0 -44
 - package/core/src/element/iframe.d.ts +0 -3
 - package/core/src/element/iframe.js +0 -12
 - package/core/src/element/index.d.ts +0 -5
 - package/core/src/element/index.js +0 -6
 - package/core/src/element/select.d.ts +0 -11
 - package/core/src/element/select.js +0 -273
 - package/core/src/element/tab.d.ts +0 -1
 - package/core/src/element/tab.js +0 -20
 - package/core/src/element/time.d.ts +0 -3
 - package/core/src/element/time.js +0 -44
 - package/core/src/middles/arrows/index.d.ts +0 -4
 - package/core/src/middles/arrows/index.js +0 -5
 - package/core/src/middles/lines/index.d.ts +0 -4
 - package/core/src/middles/lines/index.js +0 -5
 - package/core/src/middles/nodes/formDatePicker.d.ts +0 -2
 - package/core/src/middles/nodes/formDatePicker.js +0 -107
 - package/core/src/middles/nodes/formoverflow.js +0 -61
 - package/core/src/middles/nodes/formselect.d.ts +0 -2
 - package/core/src/middles/nodes/formselect.js +0 -111
 - package/core/src/middles/nodes/iframe.d.ts +0 -2
 - package/core/src/middles/nodes/iframe.js +0 -29
 - package/core/src/middles/nodes/index.d.ts +0 -51
 - package/core/src/middles/nodes/index.js +0 -53
 - package/core/src/middles/nodes/switchs.d.ts +0 -2
 - package/core/src/middles/nodes/switchs.js +0 -46
 - package/core/src/middles/nodes/time.d.ts +0 -2
 - package/core/src/middles/nodes/time.js +0 -98
 - package/core/src/store/common.d.ts +0 -9
 - package/core/src/store/common.js +0 -5
 - package/core/src/store/data.d.ts +0 -196
 - package/core/src/store/data.js +0 -193
 - package/core/src/store/index.d.ts +0 -2
 - package/core/src/store/index.js +0 -2
 - package/core/src/utils/assignment.d.ts +0 -7
 - package/core/src/utils/assignment.js +0 -216
 - package/core/src/utils/params.d.ts +0 -3
 - package/core/src/utils/params.js +0 -136
 - package/static/echartsDefaultData.js +0 -178
 - package/static/element.js +0 -14
 - package/static/form.js +0 -11
 - package/static/index.js +0 -3
 - package/store/actions.js +0 -1
 - package/store/clear.js +0 -10
 - package/store/default.js +0 -22
 - package/store/index.js +0 -3
 - package/style/common.css +0 -15
 - package/style/datePicker.css +0 -44
 - package/style/editor.css +0 -16
 - package/style/index.css +0 -5
 - package/style/select.css +0 -143
 - /package/myShape-diagram/{index.ts → myShape.ts} +0 -0
 
| 
         @@ -1,96 +1,75 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            //let DETAILDATA = null;
         
     | 
| 
       2 
     | 
    
         
            -
            import { commonStore } from '../store';
         
     | 
| 
       3 
     | 
    
         
            -
            import { getEchartsRealData } from '../utils/conversion';
         
     | 
| 
       4 
2 
     | 
    
         
             
            export function setConfItemNode(pen, syn_synata) {
         
     | 
| 
       5 
     | 
    
         
            -
                 
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                     
     | 
| 
       10 
     | 
    
         
            -
                    const  
     | 
| 
       11 
     | 
    
         
            -
                    const doorData = syn_synata.doorData && syn_synata.doorData[entranceGuard.params];
         
     | 
| 
       12 
     | 
    
         
            -
                    const doorState = doorData && !nullUndefinedRegex.test(doorData.state) && parseInt(doorData.state);
         
     | 
| 
       13 
     | 
    
         
            -
                    pen.text = doorState === 1 ? '开门' : '关门'; // 1-开门,其他值为关门
         
     | 
| 
       14 
     | 
    
         
            -
                }
         
     | 
| 
       15 
     | 
    
         
            -
                if (!pen.data) return;
         
     | 
| 
       16 
     | 
    
         
            -
                if (commonStore[pen.TID]) commonStore[pen.TID].data.dataResize = 1;
         
     | 
| 
       17 
     | 
    
         
            -
                let isAlarm = false; // 判断元件绑定的数据中是否有告警发生,用于九所项目服务器自身监控功能
         
     | 
| 
       18 
     | 
    
         
            -
                if (pen.data instanceof Array) {
         
     | 
| 
       19 
     | 
    
         
            -
                    let _syn = null;
         
     | 
| 
       20 
     | 
    
         
            -
                    let isResetVal = false;
         
     | 
| 
       21 
     | 
    
         
            -
                    const { areaData, assetData, componentData, kpiData, tagData, asset } = syn_synata;
         
     | 
| 
       22 
     | 
    
         
            -
                    const comData = componentData && componentData[pen.id];
         
     | 
| 
      
 3 
     | 
    
         
            +
                if (!pen.data) return
         
     | 
| 
      
 4 
     | 
    
         
            +
                if(pen.data instanceof Array) {
         
     | 
| 
      
 5 
     | 
    
         
            +
                    let _syn = ''
         
     | 
| 
      
 6 
     | 
    
         
            +
                    let isResetVal = false
         
     | 
| 
      
 7 
     | 
    
         
            +
                    let isResetFontColor = false
         
     | 
| 
      
 8 
     | 
    
         
            +
                    const {areaData, assetData, kpiData, tagData, asset} = syn_synata
         
     | 
| 
       23 
9 
     | 
    
         
             
                    pen.data.map((d) => {
         
     | 
| 
       24 
10 
     | 
    
         
             
                        const key = d.key;
         
     | 
| 
       25 
11 
     | 
    
         
             
                        let value = d.value;
         
     | 
| 
       26 
     | 
    
         
            -
                         
     | 
| 
      
 12 
     | 
    
         
            +
                        const assetItem = assetData[value];
         
     | 
| 
      
 13 
     | 
    
         
            +
                        const areaItem = areaData[value];
         
     | 
| 
      
 14 
     | 
    
         
            +
                        const kpiItem = kpiData[value];
         
     | 
| 
      
 15 
     | 
    
         
            +
                        if(key === 'tagId') value = d.tagId ? d.tagId : d.value
         
     | 
| 
      
 16 
     | 
    
         
            +
                        const tagItem = tagData[value];
         
     | 
| 
       27 
17 
     | 
    
         
             
                        //console.log('key===========', d)
         
     | 
| 
       28 
18 
     | 
    
         
             
                        if (key === 'assetKey' && d.value === 'assetName' && asset) {
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
19 
     | 
    
         
             
                            pen.text = asset.assetName;
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                            _syn = comData || assetData[value];
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
      
 20 
     | 
    
         
            +
                        }else if (key === 'assetId' && assetItem) {
         
     | 
| 
      
 21 
     | 
    
         
            +
                            _syn = assetItem;
         
     | 
| 
       36 
22 
     | 
    
         
             
                            // if(value === '264'){console.log('_syn',_syn,pen.name,parseInt(_syn.state))}
         
     | 
| 
       37 
     | 
    
         
            -
                        } 
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                            _syn = comData || tagData[value];
         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
                            if (_syn.kpiName !== '通讯状态' || pen.name !== 'circle') {
         
     | 
| 
       46 
     | 
    
         
            -
                                isResetVal = true;
         
     | 
| 
      
 23 
     | 
    
         
            +
                        }else if (key === 'areaId' && areaItem) {
         
     | 
| 
      
 24 
     | 
    
         
            +
                            _syn = areaItem;
         
     | 
| 
      
 25 
     | 
    
         
            +
                        }else if (key === 'tagId' && tagItem) {
         
     | 
| 
      
 26 
     | 
    
         
            +
                            _syn = tagItem;
         
     | 
| 
      
 27 
     | 
    
         
            +
                            if(_syn.kpiName !== '通讯状态' || pen.name !== 'circle'){
         
     | 
| 
      
 28 
     | 
    
         
            +
                                isResetVal = true
         
     | 
| 
       47 
29 
     | 
    
         
             
                            }
         
     | 
| 
       48 
     | 
    
         
            -
                            const isControl = parseInt( 
     | 
| 
      
 30 
     | 
    
         
            +
                            const isControl = parseInt(tagItem.isControlDis); // 是否可控,0可控,1不可控
         
     | 
| 
       49 
31 
     | 
    
         
             
                            //d.isControlDis = isControlDis
         
     | 
| 
       50 
     | 
    
         
            -
                            if 
     | 
| 
      
 32 
     | 
    
         
            +
                            if(!isControl) {
         
     | 
| 
       51 
33 
     | 
    
         
             
                                d.tagVal = value
         
     | 
| 
       52 
     | 
    
         
            -
                                d.controlParams =  
     | 
| 
      
 34 
     | 
    
         
            +
                                d.controlParams = tagItem
         
     | 
| 
       53 
35 
     | 
    
         
             
                                //Object.assign(d, tagItem)
         
     | 
| 
       54 
36 
     | 
    
         
             
                            }
         
     | 
| 
       55 
     | 
    
         
            -
                        } 
     | 
| 
       56 
     | 
    
         
            -
                            _syn =  
     | 
| 
      
 37 
     | 
    
         
            +
                        }else if (key === 'kpiAddr' && kpiItem) {
         
     | 
| 
      
 38 
     | 
    
         
            +
                            _syn = kpiItem;
         
     | 
| 
       57 
39 
     | 
    
         
             
                            isResetVal = true
         
     | 
| 
       58 
     | 
    
         
            -
                            const isControl = parseInt( 
     | 
| 
      
 40 
     | 
    
         
            +
                            const isControl = parseInt(kpiItem.isControlDis); // 是否可控,0可控,1不可控
         
     | 
| 
       59 
41 
     | 
    
         
             
                            //d.isControlDis = isControlDis
         
     | 
| 
       60 
     | 
    
         
            -
                            if 
     | 
| 
      
 42 
     | 
    
         
            +
                            if(!isControl) {
         
     | 
| 
       61 
43 
     | 
    
         
             
                                d.tagVal = value
         
     | 
| 
       62 
     | 
    
         
            -
                                d.controlParams =  
     | 
| 
      
 44 
     | 
    
         
            +
                                d.controlParams = kpiItem
         
     | 
| 
       63 
45 
     | 
    
         
             
                                // delete kpiItem[value]
         
     | 
| 
       64 
46 
     | 
    
         
             
                                // Object.assign(d, kpiItem)
         
     | 
| 
       65 
47 
     | 
    
         
             
                            }
         
     | 
| 
       66 
48 
     | 
    
         
             
                        }
         
     | 
| 
       67 
49 
     | 
    
         
             
                    })
         
     | 
| 
       68 
     | 
    
         
            -
                    if (!_syn) return;
         
     | 
| 
       69 
50 
     | 
    
         
             
                    // const type = parseInt(_syn.type) // 是否是开关量
         
     | 
| 
       70 
51 
     | 
    
         
             
                    // 显示的值
         
     | 
| 
       71 
52 
     | 
    
         
             
                    if (isResetVal) pen.text = `${_syn.value}${_syn.unit}`;
         
     | 
| 
       72 
53 
     | 
    
         
             
                    const state = parseInt(_syn.state)
         
     | 
| 
       73 
     | 
    
         
            -
                    if 
     | 
| 
      
 54 
     | 
    
         
            +
                    if(!state && state !== 0) return
         
     | 
| 
       74 
55 
     | 
    
         
             
                    const name = pen.name
         
     | 
| 
       75 
56 
     | 
    
         
             
                    // 显示的颜色
         
     | 
| 
       76 
57 
     | 
    
         
             
                    let color = ''
         
     | 
| 
       77 
58 
     | 
    
         
             
                    switch (state) {
         
     | 
| 
       78 
59 
     | 
    
         
             
                        case 0: // 正常告警
         
     | 
| 
       79 
60 
     | 
    
         
             
                            color = '#FF0000';
         
     | 
| 
       80 
     | 
    
         
            -
                            isAlarm = true;
         
     | 
| 
       81 
61 
     | 
    
         
             
                            break;
         
     | 
| 
       82 
62 
     | 
    
         
             
                        case 1: // 离线告警, 通讯开关告警
         
     | 
| 
       83 
63 
     | 
    
         
             
                            color = '#6d6d6d';
         
     | 
| 
       84 
     | 
    
         
            -
                            isAlarm = true;
         
     | 
| 
       85 
64 
     | 
    
         
             
                            break;
         
     | 
| 
       86 
65 
     | 
    
         
             
                        case 2: // 未告警
         
     | 
| 
       87 
66 
     | 
    
         
             
                        case 3: // 无告警
         
     | 
| 
       88 
67 
     | 
    
         
             
                            let defaulColor = ''
         
     | 
| 
       89 
68 
     | 
    
         
             
                            if (name === 'text') {
         
     | 
| 
       90 
69 
     | 
    
         
             
                                defaulColor = 'defaultFontColor'
         
     | 
| 
       91 
     | 
    
         
            -
                            } 
     | 
| 
      
 70 
     | 
    
         
            +
                            }else if(name === 'line') {
         
     | 
| 
       92 
71 
     | 
    
         
             
                                defaulColor = 'defaultStrokeStyle'
         
     | 
| 
       93 
     | 
    
         
            -
                            } 
     | 
| 
      
 72 
     | 
    
         
            +
                            }else {
         
     | 
| 
       94 
73 
     | 
    
         
             
                                defaulColor = 'defaultFillStyle'
         
     | 
| 
       95 
74 
     | 
    
         
             
                            }
         
     | 
| 
       96 
75 
     | 
    
         
             
                            color = pen[defaulColor]
         
     | 
| 
         @@ -99,41 +78,84 @@ export function setConfItemNode(pen, syn_synata) { 
     | 
|
| 
       99 
78 
     | 
    
         
             
                            color = '#D38C00';
         
     | 
| 
       100 
79 
     | 
    
         
             
                            break;
         
     | 
| 
       101 
80 
     | 
    
         
             
                    }
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
       102 
82 
     | 
    
         
             
                    // 显示的属性
         
     | 
| 
       103 
83 
     | 
    
         
             
                    if (name === 'text') {
         
     | 
| 
       104 
84 
     | 
    
         
             
                        pen.font.color = color
         
     | 
| 
       105 
     | 
    
         
            -
                    } 
     | 
| 
      
 85 
     | 
    
         
            +
                    }else if(name === 'line') {
         
     | 
| 
       106 
86 
     | 
    
         
             
                        pen.strokeStyle = color
         
     | 
| 
       107 
87 
     | 
    
         
             
                        pen.text = ''
         
     | 
| 
       108 
     | 
    
         
            -
                    } 
     | 
| 
       109 
     | 
    
         
            -
                        //获取值说明中的开值 默认为第一个值为开
         
     | 
| 
       110 
     | 
    
         
            -
                        let openValue = getOpenValue(_syn.valExplain)
         
     | 
| 
       111 
     | 
    
         
            -
                        pen.isOpen = _syn.v == openValue;
         
     | 
| 
       112 
     | 
    
         
            -
                        pen.fillStyle = pen.isOpen ? pen.visitStrokeStyle : pen.strokeStyle;
         
     | 
| 
       113 
     | 
    
         
            -
                        pen.text = '';
         
     | 
| 
       114 
     | 
    
         
            -
                    }
         
     | 
| 
       115 
     | 
    
         
            -
                    else {
         
     | 
| 
      
 88 
     | 
    
         
            +
                    }else {
         
     | 
| 
       116 
89 
     | 
    
         
             
                        pen.fillStyle = color
         
     | 
| 
       117 
90 
     | 
    
         
             
                    }
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
       118 
92 
     | 
    
         
             
                    if (name === 'electricFan') setFanData(pen, _syn)
         
     | 
| 
       119 
     | 
    
         
            -
                } 
     | 
| 
      
 93 
     | 
    
         
            +
                }else {
         
     | 
| 
       120 
94 
     | 
    
         
             
                    if (pen.elementRendered) pen.elementRendered = false;
         
     | 
| 
       121 
     | 
    
         
            -
                    if 
     | 
| 
      
 95 
     | 
    
         
            +
                    if(pen.data.params && pen.data.echarts) {
         
     | 
| 
       122 
96 
     | 
    
         
             
                        const { echartDataValue } = syn_synata;
         
     | 
| 
      
 97 
     | 
    
         
            +
                        //const seriesData = pen.data.echarts.option.series.length > 1 ? echartDataValue : echartData
         
     | 
| 
       123 
98 
     | 
    
         
             
                        const seriesData = echartDataValue;
         
     | 
| 
       124 
     | 
    
         
            -
                         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
      
 99 
     | 
    
         
            +
                        if(seriesData) pen.data.echarts = setStatisticalData(pen, seriesData)
         
     | 
| 
      
 100 
     | 
    
         
            +
                    }
         
     | 
| 
      
 101 
     | 
    
         
            +
                }
         
     | 
| 
      
 102 
     | 
    
         
            +
                return pen
         
     | 
| 
      
 103 
     | 
    
         
            +
            }
         
     | 
| 
      
 104 
     | 
    
         
            +
            export function setStatisticalData(pen, echartData) {
         
     | 
| 
      
 105 
     | 
    
         
            +
                const node = Object.assign({}, pen);
         
     | 
| 
      
 106 
     | 
    
         
            +
                const displayMode = parseInt(node.data.echarts.option.displayMode);
         
     | 
| 
      
 107 
     | 
    
         
            +
                const chartData = echartData[node.data.params.id];
         
     | 
| 
      
 108 
     | 
    
         
            +
                if ((displayMode === 1 || displayMode === 2) && chartData){ // 折线图,柱状图
         
     | 
| 
      
 109 
     | 
    
         
            +
                    //const xData = [], seriesData = [];
         
     | 
| 
      
 110 
     | 
    
         
            +
                    const staticForType = node.data.params.staticForType ? node.data.params.staticForType : '';//统计类型:日,周,月,年
         
     | 
| 
      
 111 
     | 
    
         
            +
                    const seriesNodes = node.data.echarts.option.series;
         
     | 
| 
      
 112 
     | 
    
         
            +
                    // 双轴曲线
         
     | 
| 
      
 113 
     | 
    
         
            +
                    if(seriesNodes.length > 1 || node.data.params.curveNum > 1){
         
     | 
| 
      
 114 
     | 
    
         
            +
                        const chartOptions = staticForType ? chartData[`${staticForType}_Data`] : chartData;
         
     | 
| 
      
 115 
     | 
    
         
            +
                        const legendData = [];
         
     | 
| 
      
 116 
     | 
    
         
            +
                        if(!chartOptions) return;
         
     | 
| 
      
 117 
     | 
    
         
            +
                        node.data.echarts.option.xAxis[0].data = chartOptions.XData;
         
     | 
| 
      
 118 
     | 
    
         
            +
                        let legend = node.data.echarts.option.legend;
         
     | 
| 
      
 119 
     | 
    
         
            +
                        if(chartOptions.seriesData.length) {
         
     | 
| 
      
 120 
     | 
    
         
            +
                            //循环给每条统计数据赋值
         
     | 
| 
      
 121 
     | 
    
         
            +
                            seriesNodes.map((item, index) => {
         
     | 
| 
      
 122 
     | 
    
         
            +
                                const { name, data } = chartOptions.seriesData[index];
         
     | 
| 
      
 123 
     | 
    
         
            +
                                item.name = name;
         
     | 
| 
      
 124 
     | 
    
         
            +
                                item.data = data;
         
     | 
| 
      
 125 
     | 
    
         
            +
                                legendData.push(name);
         
     | 
| 
      
 126 
     | 
    
         
            +
                            });
         
     | 
| 
      
 127 
     | 
    
         
            +
                            legend.data = legendData;
         
     | 
| 
      
 128 
     | 
    
         
            +
                        }else {
         
     | 
| 
      
 129 
     | 
    
         
            +
                            node.data.echarts.option.legend = [];
         
     | 
| 
      
 130 
     | 
    
         
            +
                            node.data.echarts.option.series = []
         
     | 
| 
      
 131 
     | 
    
         
            +
                        }
         
     | 
| 
      
 132 
     | 
    
         
            +
                    }else {
         
     | 
| 
      
 133 
     | 
    
         
            +
                        const chartOptions = staticForType ? chartData[`${staticForType}_Data`] : chartData;
         
     | 
| 
      
 134 
     | 
    
         
            +
                        if(chartOptions) {
         
     | 
| 
      
 135 
     | 
    
         
            +
                            node.data.echarts.option.xAxis[0].data = chartOptions.XData;
         
     | 
| 
      
 136 
     | 
    
         
            +
                            node.data.echarts.option.series[0].data = chartOptions.seriesData;
         
     | 
| 
       129 
137 
     | 
    
         
             
                        }
         
     | 
| 
       130 
138 
     | 
    
         
             
                    }
         
     | 
| 
       131 
139 
     | 
    
         
             
                }
         
     | 
| 
       132 
     | 
    
         
            -
                 
     | 
| 
       133 
     | 
    
         
            -
                     
     | 
| 
      
 140 
     | 
    
         
            +
                if (displayMode === 5 && chartData){ // 饼图
         
     | 
| 
      
 141 
     | 
    
         
            +
                    const colors = node.data.echarts.option.color;
         
     | 
| 
      
 142 
     | 
    
         
            +
                    const seriesData = [];
         
     | 
| 
      
 143 
     | 
    
         
            +
                    chartData.map((chd, index) => {
         
     | 
| 
      
 144 
     | 
    
         
            +
                        seriesData.push({
         
     | 
| 
      
 145 
     | 
    
         
            +
                            itemStyle: { color: colors[index] },
         
     | 
| 
      
 146 
     | 
    
         
            +
                            name: chd.name,
         
     | 
| 
      
 147 
     | 
    
         
            +
                            value: chd.value
         
     | 
| 
      
 148 
     | 
    
         
            +
                        })
         
     | 
| 
      
 149 
     | 
    
         
            +
                    })
         
     | 
| 
      
 150 
     | 
    
         
            +
                    node.data.echarts.option.series[0].data = seriesData;
         
     | 
| 
       134 
151 
     | 
    
         
             
                }
         
     | 
| 
      
 152 
     | 
    
         
            +
                if(displayMode === 6 && chartData){ // 仪表盘
         
     | 
| 
      
 153 
     | 
    
         
            +
                    node.appearance.title.text = chartData.name;
         
     | 
| 
      
 154 
     | 
    
         
            +
                    node.data.echarts.option.title.text = chartData.name;
         
     | 
| 
      
 155 
     | 
    
         
            +
                    node.data.echarts.option.series[0].data[0].value = chartData.value;
         
     | 
| 
      
 156 
     | 
    
         
            +
                }
         
     | 
| 
      
 157 
     | 
    
         
            +
                return node.data.echarts;
         
     | 
| 
       135 
158 
     | 
    
         
             
            }
         
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
159 
     | 
    
         
             
            export function setNodeEvents(item, pen) {
         
     | 
| 
       138 
160 
     | 
    
         | 
| 
       139 
161 
     | 
    
         
             
            }
         
     | 
| 
         @@ -149,24 +171,24 @@ export function setFanData(pen, syncData) { 
     | 
|
| 
       149 
171 
     | 
    
         
             
                let runState = false
         
     | 
| 
       150 
172 
     | 
    
         
             
                let percentage = 1
         
     | 
| 
       151 
173 
     | 
    
         
             
                const value = parseInt(syncData.v)
         
     | 
| 
       152 
     | 
    
         
            -
                if 
     | 
| 
       153 
     | 
    
         
            -
                    if 
     | 
| 
      
 174 
     | 
    
         
            +
                if(pen.fanValType == '1'){
         
     | 
| 
      
 175 
     | 
    
         
            +
                    if(value > pen.fanMinVal  && value <= pen.fanMaxVal) {
         
     | 
| 
       154 
176 
     | 
    
         
             
                        runState = true
         
     | 
| 
       155 
     | 
    
         
            -
                        percentage = value 
     | 
| 
      
 177 
     | 
    
         
            +
                        percentage = value/(pen.fanMaxVal-pen.fanMinVal)
         
     | 
| 
       156 
178 
     | 
    
         
             
                    }
         
     | 
| 
       157 
     | 
    
         
            -
                } 
     | 
| 
       158 
     | 
    
         
            -
                    if 
     | 
| 
      
 179 
     | 
    
         
            +
                }else if(pen.fanValType == '2'){
         
     | 
| 
      
 180 
     | 
    
         
            +
                    if(pen.fanNorVal === value) runState = true
         
     | 
| 
       159 
181 
     | 
    
         
             
                }
         
     | 
| 
       160 
     | 
    
         
            -
                if 
     | 
| 
      
 182 
     | 
    
         
            +
                if(runState){
         
     | 
| 
       161 
183 
     | 
    
         
             
                    addAnimateByRevolve(pen, percentage)
         
     | 
| 
       162 
184 
     | 
    
         
             
                    pen.animatePlay = true
         
     | 
| 
       163 
     | 
    
         
            -
                } 
     | 
| 
      
 185 
     | 
    
         
            +
                }else{
         
     | 
| 
       164 
186 
     | 
    
         
             
                    pen.animatePlay = false
         
     | 
| 
       165 
187 
     | 
    
         
             
                }
         
     | 
| 
       166 
188 
     | 
    
         
             
            }
         
     | 
| 
       167 
189 
     | 
    
         | 
| 
       168 
190 
     | 
    
         
             
            export function addAnimateByRevolve(pen, percentage) {
         
     | 
| 
       169 
     | 
    
         
            -
                let time = 200 
     | 
| 
      
 191 
     | 
    
         
            +
                let time = 200/pen.fanSpeed/percentage
         
     | 
| 
       170 
192 
     | 
    
         
             
                const state = JSON.parse(JSON.stringify(pen))
         
     | 
| 
       171 
193 
     | 
    
         
             
                delete state.TID
         
     | 
| 
       172 
194 
     | 
    
         
             
                delete state.animateFrames
         
     | 
| 
         @@ -181,11 +203,3 @@ export function addAnimateByRevolve(pen, percentage) { 
     | 
|
| 
       181 
203 
     | 
    
         
             
                pen.animateDuration = time;
         
     | 
| 
       182 
204 
     | 
    
         | 
| 
       183 
205 
     | 
    
         
             
            }
         
     | 
| 
       184 
     | 
    
         
            -
             
     | 
| 
       185 
     | 
    
         
            -
            export function getOpenValue(explain) {
         
     | 
| 
       186 
     | 
    
         
            -
                let value = 1
         
     | 
| 
       187 
     | 
    
         
            -
                if (!explain) return value
         
     | 
| 
       188 
     | 
    
         
            -
                value = explain.split(',')[0].split('=')[0];
         
     | 
| 
       189 
     | 
    
         
            -
                return value
         
     | 
| 
       190 
     | 
    
         
            -
             
     | 
| 
       191 
     | 
    
         
            -
            }
         
     | 
    
        package/core/src/hoverLayer.d.ts
    CHANGED
    
    | 
         @@ -1,6 +1,13 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import {  
     | 
| 
      
 1 
     | 
    
         
            +
            import { TopologyData } from './models/data';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { Rect } from './models/rect';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { Point } from './models/point';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { Line } from './models/line';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { Node } from './models/node';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import { Options } from './options';
         
     | 
| 
       2 
7 
     | 
    
         
             
            import { Layer } from './layer';
         
     | 
| 
       3 
8 
     | 
    
         
             
            export declare class HoverLayer extends Layer {
         
     | 
| 
      
 9 
     | 
    
         
            +
                options: Options;
         
     | 
| 
      
 10 
     | 
    
         
            +
                protected data: TopologyData;
         
     | 
| 
       4 
11 
     | 
    
         
             
                line: Line;
         
     | 
| 
       5 
12 
     | 
    
         
             
                initLine: Line;
         
     | 
| 
       6 
13 
     | 
    
         
             
                node: Node;
         
     | 
| 
         @@ -12,7 +19,7 @@ export declare class HoverLayer extends Layer { 
     | 
|
| 
       12 
19 
     | 
    
         
             
                dockLineY: number;
         
     | 
| 
       13 
20 
     | 
    
         
             
                root: Node;
         
     | 
| 
       14 
21 
     | 
    
         
             
                dragRect: Rect;
         
     | 
| 
       15 
     | 
    
         
            -
                constructor(TID: String);
         
     | 
| 
      
 22 
     | 
    
         
            +
                constructor(options: Options, TID: String);
         
     | 
| 
       16 
23 
     | 
    
         
             
                lineTo(to: Point, toArrow?: string): void;
         
     | 
| 
       17 
24 
     | 
    
         
             
                lineFrom(from: Point): void;
         
     | 
| 
       18 
25 
     | 
    
         
             
                lineMove(pt: Point, initPos: {
         
     | 
    
        package/core/src/hoverLayer.js
    CHANGED
    
    | 
         @@ -1,8 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            var __extends = (this && this.__extends) || (function () {
         
     | 
| 
       2 
2 
     | 
    
         
             
                var extendStatics = function (d, b) {
         
     | 
| 
       3 
3 
     | 
    
         
             
                    extendStatics = Object.setPrototypeOf ||
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 4 
     | 
    
         
            +
                        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
         
     | 
| 
      
 5 
     | 
    
         
            +
                        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
         
     | 
| 
       6 
6 
     | 
    
         
             
                    return extendStatics(d, b);
         
     | 
| 
       7 
7 
     | 
    
         
             
                };
         
     | 
| 
       8 
8 
     | 
    
         
             
                return function (d, b) {
         
     | 
| 
         @@ -11,17 +11,22 @@ var __extends = (this && this.__extends) || (function () { 
     | 
|
| 
       11 
11 
     | 
    
         
             
                    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
         
     | 
| 
       12 
12 
     | 
    
         
             
                };
         
     | 
| 
       13 
13 
     | 
    
         
             
            })();
         
     | 
| 
       14 
     | 
    
         
            -
            import { Point 
     | 
| 
      
 14 
     | 
    
         
            +
            import { Point } from './models/point';
         
     | 
| 
      
 15 
     | 
    
         
            +
            import { Node } from './models/node';
         
     | 
| 
      
 16 
     | 
    
         
            +
            import { PenType } from './models/pen';
         
     | 
| 
       15 
17 
     | 
    
         
             
            import { Store } from 'le5le-store';
         
     | 
| 
      
 18 
     | 
    
         
            +
            import { Lock } from './models/status';
         
     | 
| 
       16 
19 
     | 
    
         
             
            import { Layer } from './layer';
         
     | 
| 
       17 
     | 
    
         
            -
            import { commonStore } from './store'
         
     | 
| 
       18 
20 
     | 
    
         
             
            var HoverLayer = /** @class */ (function (_super) {
         
     | 
| 
       19 
21 
     | 
    
         
             
                __extends(HoverLayer, _super);
         
     | 
| 
       20 
     | 
    
         
            -
                function HoverLayer(TID) {
         
     | 
| 
      
 22 
     | 
    
         
            +
                function HoverLayer(options, TID) {
         
     | 
| 
      
 23 
     | 
    
         
            +
                    if (options === void 0) { options = {}; }
         
     | 
| 
       21 
24 
     | 
    
         
             
                    var _this = _super.call(this, TID) || this;
         
     | 
| 
      
 25 
     | 
    
         
            +
                    _this.options = options;
         
     | 
| 
       22 
26 
     | 
    
         
             
                    _this.hoverAnchorIndex = -1;
         
     | 
| 
       23 
27 
     | 
    
         
             
                    _this.dockLineX = 0;
         
     | 
| 
       24 
28 
     | 
    
         
             
                    _this.dockLineY = 0;
         
     | 
| 
      
 29 
     | 
    
         
            +
                    _this.data = Store.get(_this.generateStoreKey('topology-data'));
         
     | 
| 
       25 
30 
     | 
    
         
             
                    Store.set(_this.generateStoreKey('LT:HoverLayer'), _this);
         
     | 
| 
       26 
31 
     | 
    
         
             
                    return _this;
         
     | 
| 
       27 
32 
     | 
    
         
             
                }
         
     | 
| 
         @@ -65,16 +70,14 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       65 
70 
     | 
    
         
             
                };
         
     | 
| 
       66 
71 
     | 
    
         
             
                HoverLayer.prototype.render = function (ctx) {
         
     | 
| 
       67 
72 
     | 
    
         
             
                    var _this = this;
         
     | 
| 
       68 
     | 
    
         
            -
                    if( 
     | 
| 
       69 
     | 
    
         
            -
                    var globalStore = commonStore[_this.TID];
         
     | 
| 
       70 
     | 
    
         
            -
                    if (globalStore.data.locked === Lock.NoEvent) {
         
     | 
| 
      
 73 
     | 
    
         
            +
                    if (this.data.locked === Lock.NoEvent) {
         
     | 
| 
       71 
74 
     | 
    
         
             
                        return;
         
     | 
| 
       72 
75 
     | 
    
         
             
                    }
         
     | 
| 
       73 
     | 
    
         
            -
                    ctx.fillStyle =  
     | 
| 
      
 76 
     | 
    
         
            +
                    ctx.fillStyle = this.options.hoverColor;
         
     | 
| 
       74 
77 
     | 
    
         
             
                    ctx.save();
         
     | 
| 
       75 
78 
     | 
    
         
             
                    // anchors
         
     | 
| 
       76 
     | 
    
         
            -
                    if ( 
     | 
| 
       77 
     | 
    
         
            -
                         
     | 
| 
      
 79 
     | 
    
         
            +
                    if (this.options.alwaysAnchor) {
         
     | 
| 
      
 80 
     | 
    
         
            +
                        this.data.pens.forEach(function (pen) {
         
     | 
| 
       78 
81 
     | 
    
         
             
                            if (pen.type === PenType.Line) {
         
     | 
| 
       79 
82 
     | 
    
         
             
                                return;
         
     | 
| 
       80 
83 
     | 
    
         
             
                            }
         
     | 
| 
         @@ -87,23 +90,23 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       87 
90 
     | 
    
         
             
                                    continue;
         
     | 
| 
       88 
91 
     | 
    
         
             
                                }
         
     | 
| 
       89 
92 
     | 
    
         
             
                                ctx.beginPath();
         
     | 
| 
       90 
     | 
    
         
            -
                                ctx.arc(anchor.x, anchor.y, anchor.radius ||  
     | 
| 
       91 
     | 
    
         
            -
                                ctx.strokeStyle = anchor.strokeStyle ||  
     | 
| 
       92 
     | 
    
         
            -
                                ctx.fillStyle = anchor.fillStyle ||  
     | 
| 
      
 93 
     | 
    
         
            +
                                ctx.arc(anchor.x, anchor.y, anchor.radius || _this.options.anchorRadius, 0, Math.PI * 2);
         
     | 
| 
      
 94 
     | 
    
         
            +
                                ctx.strokeStyle = anchor.strokeStyle || _this.options.hoverColor;
         
     | 
| 
      
 95 
     | 
    
         
            +
                                ctx.fillStyle = anchor.fillStyle || _this.options.anchorFillStyle;
         
     | 
| 
       93 
96 
     | 
    
         
             
                                ctx.fill();
         
     | 
| 
       94 
97 
     | 
    
         
             
                                ctx.stroke();
         
     | 
| 
       95 
98 
     | 
    
         
             
                            }
         
     | 
| 
       96 
99 
     | 
    
         
             
                        });
         
     | 
| 
       97 
100 
     | 
    
         
             
                    }
         
     | 
| 
       98 
101 
     | 
    
         
             
                    ctx.restore();
         
     | 
| 
       99 
     | 
    
         
            -
                    if (this.node && ! 
     | 
| 
      
 102 
     | 
    
         
            +
                    if (this.node && !this.data.locked) {
         
     | 
| 
       100 
103 
     | 
    
         
             
                        if (!this.node.getTID()) {
         
     | 
| 
       101 
104 
     | 
    
         
             
                            this.node.setTID(this.TID);
         
     | 
| 
       102 
105 
     | 
    
         
             
                        }
         
     | 
| 
       103 
106 
     | 
    
         
             
                        this.root = this.getRoot(this.node) || this.node;
         
     | 
| 
       104 
107 
     | 
    
         
             
                        if (this.root) {
         
     | 
| 
       105 
108 
     | 
    
         
             
                            ctx.save();
         
     | 
| 
       106 
     | 
    
         
            -
                            ctx.strokeStyle =  
     | 
| 
      
 109 
     | 
    
         
            +
                            ctx.strokeStyle = this.options.dragColor;
         
     | 
| 
       107 
110 
     | 
    
         
             
                            ctx.globalAlpha = 0.2;
         
     | 
| 
       108 
111 
     | 
    
         
             
                            if (this.root.rotate) {
         
     | 
| 
       109 
112 
     | 
    
         
             
                                ctx.translate(this.root.rect.center.x, this.root.rect.center.y);
         
     | 
| 
         @@ -114,20 +117,20 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       114 
117 
     | 
    
         
             
                            ctx.strokeRect(this.root.rect.x, this.root.rect.y, this.root.rect.width, this.root.rect.height);
         
     | 
| 
       115 
118 
     | 
    
         
             
                            ctx.restore();
         
     | 
| 
       116 
119 
     | 
    
         
             
                        }
         
     | 
| 
       117 
     | 
    
         
            -
                        if (! 
     | 
| 
      
 120 
     | 
    
         
            +
                        if (!this.options.hideAnchor) {
         
     | 
| 
       118 
121 
     | 
    
         
             
                            for (var i = 0; i < this.node.rotatedAnchors.length; ++i) {
         
     | 
| 
       119 
122 
     | 
    
         
             
                                if (this.node.locked ||
         
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
      
 123 
     | 
    
         
            +
                                    this.node.hideAnchor ||
         
     | 
| 
      
 124 
     | 
    
         
            +
                                    (this.node.rotatedAnchors[i].hidden && this.hoverAnchorIndex !== i)) {
         
     | 
| 
       122 
125 
     | 
    
         
             
                                    continue;
         
     | 
| 
       123 
126 
     | 
    
         
             
                                }
         
     | 
| 
       124 
127 
     | 
    
         
             
                                ctx.beginPath();
         
     | 
| 
       125 
     | 
    
         
            -
                                ctx.arc(this.node.rotatedAnchors[i].x, this.node.rotatedAnchors[i].y, this.node.rotatedAnchors[i].radius ||  
     | 
| 
      
 128 
     | 
    
         
            +
                                ctx.arc(this.node.rotatedAnchors[i].x, this.node.rotatedAnchors[i].y, this.node.rotatedAnchors[i].radius || this.options.anchorRadius, 0, Math.PI * 2);
         
     | 
| 
       126 
129 
     | 
    
         
             
                                ctx.strokeStyle =
         
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
      
 130 
     | 
    
         
            +
                                    this.node.rotatedAnchors[i].strokeStyle || this.options.hoverColor;
         
     | 
| 
       128 
131 
     | 
    
         
             
                                ctx.fillStyle =
         
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
                                         
     | 
| 
      
 132 
     | 
    
         
            +
                                    this.node.rotatedAnchors[i].fillStyle ||
         
     | 
| 
      
 133 
     | 
    
         
            +
                                        this.options.anchorFillStyle;
         
     | 
| 
       131 
134 
     | 
    
         
             
                                ctx.fill();
         
     | 
| 
       132 
135 
     | 
    
         
             
                                ctx.stroke();
         
     | 
| 
       133 
136 
     | 
    
         
             
                            }
         
     | 
| 
         @@ -136,9 +139,9 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       136 
139 
     | 
    
         
             
                    if (this.dockAnchor) {
         
     | 
| 
       137 
140 
     | 
    
         
             
                        ctx.save();
         
     | 
| 
       138 
141 
     | 
    
         
             
                        ctx.beginPath();
         
     | 
| 
       139 
     | 
    
         
            -
                        ctx.arc(this.dockAnchor.x, this.dockAnchor.y, this.dockAnchor.radius ||  
     | 
| 
       140 
     | 
    
         
            -
                        ctx.strokeStyle =  
     | 
| 
       141 
     | 
    
         
            -
                        ctx.fillStyle =  
     | 
| 
      
 142 
     | 
    
         
            +
                        ctx.arc(this.dockAnchor.x, this.dockAnchor.y, this.dockAnchor.radius || this.options.anchorRadius, 0, Math.PI * 2);
         
     | 
| 
      
 143 
     | 
    
         
            +
                        ctx.strokeStyle = this.options.dockStrokeStyle;
         
     | 
| 
      
 144 
     | 
    
         
            +
                        ctx.fillStyle = this.options.dockFillStyle;
         
     | 
| 
       142 
145 
     | 
    
         
             
                        ctx.fill();
         
     | 
| 
       143 
146 
     | 
    
         
             
                        ctx.stroke();
         
     | 
| 
       144 
147 
     | 
    
         
             
                        ctx.restore();
         
     | 
| 
         @@ -148,7 +151,7 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       148 
151 
     | 
    
         
             
                        ctx.arc(this.hoverLineCP.x, this.hoverLineCP.y, 5, 0, Math.PI * 2);
         
     | 
| 
       149 
152 
     | 
    
         
             
                        ctx.fill();
         
     | 
| 
       150 
153 
     | 
    
         
             
                    }
         
     | 
| 
       151 
     | 
    
         
            -
                    ctx.strokeStyle =  
     | 
| 
      
 154 
     | 
    
         
            +
                    ctx.strokeStyle = this.options.hoverColor + '80';
         
     | 
| 
       152 
155 
     | 
    
         
             
                    ctx.lineWidth = 1;
         
     | 
| 
       153 
156 
     | 
    
         
             
                    if (this.dockLineX > 0) {
         
     | 
| 
       154 
157 
     | 
    
         
             
                        var size = Store.get(this.generateStoreKey('LT:size'));
         
     | 
| 
         @@ -166,8 +169,8 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       166 
169 
     | 
    
         
             
                    }
         
     | 
| 
       167 
170 
     | 
    
         
             
                    // Select nodes by drag.
         
     | 
| 
       168 
171 
     | 
    
         
             
                    if (this.dragRect) {
         
     | 
| 
       169 
     | 
    
         
            -
                        ctx.fillStyle =  
     | 
| 
       170 
     | 
    
         
            -
                        ctx.strokeStyle =  
     | 
| 
      
 172 
     | 
    
         
            +
                        ctx.fillStyle = this.options.dragColor + '30';
         
     | 
| 
      
 173 
     | 
    
         
            +
                        ctx.strokeStyle = this.options.dragColor;
         
     | 
| 
       171 
174 
     | 
    
         
             
                        ctx.beginPath();
         
     | 
| 
       172 
175 
     | 
    
         
             
                        ctx.strokeRect(this.dragRect.x, this.dragRect.y, this.dragRect.width, this.dragRect.height);
         
     | 
| 
       173 
176 
     | 
    
         
             
                        ctx.fillRect(this.dragRect.x, this.dragRect.y, this.dragRect.width, this.dragRect.height);
         
     | 
| 
         @@ -177,7 +180,7 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       177 
180 
     | 
    
         
             
                    if (!node.parentId) {
         
     | 
| 
       178 
181 
     | 
    
         
             
                        return null;
         
     | 
| 
       179 
182 
     | 
    
         
             
                    }
         
     | 
| 
       180 
     | 
    
         
            -
                    for (var _i = 0, _a =  
     | 
| 
      
 183 
     | 
    
         
            +
                    for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
         
     | 
| 
       181 
184 
     | 
    
         
             
                        var item = _a[_i];
         
     | 
| 
       182 
185 
     | 
    
         
             
                        if (item instanceof Node && item.id === node.parentId) {
         
     | 
| 
       183 
186 
     | 
    
         
             
                            var n = this.getRoot(item);
         
     | 
| 
         @@ -193,4 +196,4 @@ var HoverLayer = /** @class */ (function (_super) { 
     | 
|
| 
       193 
196 
     | 
    
         
             
                return HoverLayer;
         
     | 
| 
       194 
197 
     | 
    
         
             
            }(Layer));
         
     | 
| 
       195 
198 
     | 
    
         
             
            export { HoverLayer };
         
     | 
| 
       196 
     | 
    
         
            -
            //# sourceMappingURL=hoverLayer.js.map
         
     | 
| 
      
 199 
     | 
    
         
            +
            //# sourceMappingURL=hoverLayer.js.map
         
     | 
| 
         @@ -1,4 +1,6 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import { Point 
     | 
| 
      
 1 
     | 
    
         
            +
            import { Point } from '../models';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { Node } from '../models';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { Line } from '../models';
         
     | 
| 
       2 
4 
     | 
    
         
             
            export declare const drawNodeFns: any;
         
     | 
| 
       3 
5 
     | 
    
         
             
            export declare const iconRectFns: any;
         
     | 
| 
       4 
6 
     | 
    
         
             
            export declare const textRectFns: any;
         
     | 
| 
         @@ -1,52 +1,54 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import {
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
            } from './ 
     | 
| 
       22 
     | 
    
         
            -
            import {
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            } from './ 
     | 
| 
       40 
     | 
    
         
            -
            import {
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
            } from './ 
     | 
| 
      
 1 
     | 
    
         
            +
            import { rectangle } from './nodes/rectangle';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { circle } from './nodes/circle';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { triangle } from './nodes/triangle';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { diamond } from './nodes/diamond';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { leftArrow, rightArrow, twowayArrow } from './nodes/arrow';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import { text } from './nodes/text';
         
     | 
| 
      
 7 
     | 
    
         
            +
            import { line as nodeLine } from './nodes/line';
         
     | 
| 
      
 8 
     | 
    
         
            +
            import { triangleAnchors } from './nodes/triangle.anchor';
         
     | 
| 
      
 9 
     | 
    
         
            +
            import { arrowAnchors } from './nodes/arrow.anchor';
         
     | 
| 
      
 10 
     | 
    
         
            +
            import { lineAnchors } from './nodes/line.anchor';
         
     | 
| 
      
 11 
     | 
    
         
            +
            import { circleIconRect, circleTextRect } from './nodes/circle.rect';
         
     | 
| 
      
 12 
     | 
    
         
            +
            import { triangleIconRect, triangleTextRect } from './nodes/triangle.rect';
         
     | 
| 
      
 13 
     | 
    
         
            +
            import { diamondIconRect, diamondTextRect } from './nodes/diamond.rect';
         
     | 
| 
      
 14 
     | 
    
         
            +
            import { twowayArrowIconRect, twowayArrowTextRect, leftArrowIconRect, leftArrowTextRect, rightArrowIconRect, rightArrowTextRect } from './nodes/arrow.rect';
         
     | 
| 
      
 15 
     | 
    
         
            +
            import { lineIconRect, lineTextRect } from './nodes/line.rect';
         
     | 
| 
      
 16 
     | 
    
         
            +
            import { line, lineControlPoints, calcLineControlPoints } from './lines/line';
         
     | 
| 
      
 17 
     | 
    
         
            +
            import { polyline, polylineControlPoints, pointInPolyline, calcPolylineControlPoints, dockPolylineControlPoint } from './lines/polyline';
         
     | 
| 
      
 18 
     | 
    
         
            +
            import { curve, curveControlPoints, pointInCurve, calcCurveControlPoints } from './lines/curve';
         
     | 
| 
      
 19 
     | 
    
         
            +
            import { mind, calcMindControlPoints, mindControlPoints, pointInMind } from './lines/mind';
         
     | 
| 
      
 20 
     | 
    
         
            +
            import { triangleSolid, triangle as arrowTriangle } from './arrows/triangle';
         
     | 
| 
      
 21 
     | 
    
         
            +
            import { diamondSolid, diamond as arrowDiamond } from './arrows/diamond';
         
     | 
| 
      
 22 
     | 
    
         
            +
            import { circleSolid, circle as arrowCircle } from './arrows/circle';
         
     | 
| 
      
 23 
     | 
    
         
            +
            import { circleAnchors } from './nodes/circle.anchor';
         
     | 
| 
      
 24 
     | 
    
         
            +
            import { lineUp, lineDown, line as arrowLine } from './arrows/line';
         
     | 
| 
      
 25 
     | 
    
         
            +
            import { pentagon } from './nodes/pentagon';
         
     | 
| 
      
 26 
     | 
    
         
            +
            import { pentagonIconRect, pentagonTextRect } from './nodes/pentagon.rect';
         
     | 
| 
      
 27 
     | 
    
         
            +
            import { pentagonAnchors } from './nodes/pentagon.anchor';
         
     | 
| 
      
 28 
     | 
    
         
            +
            import { hexagon } from './nodes/hexagon';
         
     | 
| 
      
 29 
     | 
    
         
            +
            import { hexagonAnchors } from './nodes/hexagon.anchor';
         
     | 
| 
      
 30 
     | 
    
         
            +
            import { hexagonIconRect, hexagonTextRect } from './nodes/hexagon.rect';
         
     | 
| 
      
 31 
     | 
    
         
            +
            import { pentagram } from './nodes/pentagram';
         
     | 
| 
      
 32 
     | 
    
         
            +
            import { pentagramAnchors } from './nodes/pentagram.anchor';
         
     | 
| 
      
 33 
     | 
    
         
            +
            import { pentagramIconRect, pentagramTextRect } from './nodes/pentagram.rect';
         
     | 
| 
      
 34 
     | 
    
         
            +
            import { cloud } from './nodes/cloud';
         
     | 
| 
      
 35 
     | 
    
         
            +
            import { cloudAnchors } from './nodes/cloud.anchor';
         
     | 
| 
      
 36 
     | 
    
         
            +
            import { cloudIconRect, cloudTextRect } from './nodes/cloud.rect';
         
     | 
| 
      
 37 
     | 
    
         
            +
            import { message } from './nodes/message';
         
     | 
| 
      
 38 
     | 
    
         
            +
            import { messageIconRect, messageTextRect } from './nodes/message.rect';
         
     | 
| 
      
 39 
     | 
    
         
            +
            import { messageAnchors } from './nodes/message.anchor';
         
     | 
| 
      
 40 
     | 
    
         
            +
            import { file } from './nodes/file';
         
     | 
| 
      
 41 
     | 
    
         
            +
            import { imageIconRect, imageTextRect } from './nodes/image.rect';
         
     | 
| 
      
 42 
     | 
    
         
            +
            import { cube } from './nodes/cube';
         
     | 
| 
      
 43 
     | 
    
         
            +
            import { cubeAnchors } from './nodes/cube.anchor';
         
     | 
| 
      
 44 
     | 
    
         
            +
            import { cubeIconRect, cubeTextRect } from './nodes/cube.rect';
         
     | 
| 
      
 45 
     | 
    
         
            +
            import { people } from './nodes/people';
         
     | 
| 
      
 46 
     | 
    
         
            +
            import { peopleIconRect, peopleTextRect } from './nodes/people.rect';
         
     | 
| 
      
 47 
     | 
    
         
            +
            import { rectangleIconRect, rectangleTextRect } from './nodes/rectangle.rect';
         
     | 
| 
      
 48 
     | 
    
         
            +
            import { arbitraryGraph } from './nodes/arbitrarygraph';
         
     | 
| 
      
 49 
     | 
    
         
            +
            import { arbitraryGraphAnchors } from './nodes/arbitrarygraph.anchor';
         
     | 
| 
      
 50 
     | 
    
         
            +
            import { formtable } from './nodes/formtable';
         
     | 
| 
      
 51 
     | 
    
         
            +
            import { tablePagination } from './nodes/tablePagination';
         
     | 
| 
       50 
52 
     | 
    
         
             
            // Functions of drawing a node.
         
     | 
| 
       51 
53 
     | 
    
         
             
            export var drawNodeFns = {};
         
     | 
| 
       52 
54 
     | 
    
         
             
            // Calc the occupy rect of icon.
         
     | 
| 
         @@ -62,12 +64,6 @@ export var drawArrowFns = {}; 
     | 
|
| 
       62 
64 
     | 
    
         
             
            function init() {
         
     | 
| 
       63 
65 
     | 
    
         
             
                console.log('Init middles.');
         
     | 
| 
       64 
66 
     | 
    
         
             
                // ********Default nodes.*******
         
     | 
| 
       65 
     | 
    
         
            -
                // datePicker
         
     | 
| 
       66 
     | 
    
         
            -
                drawNodeFns.datePicker = fromDatePicker;
         
     | 
| 
       67 
     | 
    
         
            -
                // select
         
     | 
| 
       68 
     | 
    
         
            -
                drawNodeFns.select = formSelect;
         
     | 
| 
       69 
     | 
    
         
            -
                // iframe
         
     | 
| 
       70 
     | 
    
         
            -
                drawNodeFns.iframe = iframePrimeval;
         
     | 
| 
       71 
67 
     | 
    
         
             
                // tablePagination
         
     | 
| 
       72 
68 
     | 
    
         
             
                drawNodeFns.tablePagination = tablePagination;
         
     | 
| 
       73 
69 
     | 
    
         
             
                // formtable
         
     | 
| 
         @@ -201,14 +197,6 @@ function init() { 
     | 
|
| 
       201 
197 
     | 
    
         
             
                drawArrowFns.lineUp = lineUp;
         
     | 
| 
       202 
198 
     | 
    
         
             
                drawArrowFns.lineDown = lineDown;
         
     | 
| 
       203 
199 
     | 
    
         
             
                // ********end********
         
     | 
| 
       204 
     | 
    
         
            -
                // 当前时间
         
     | 
| 
       205 
     | 
    
         
            -
                drawNodeFns.time = time;
         
     | 
| 
       206 
     | 
    
         
            -
                iconRectFns.time = rectangleIconRect;
         
     | 
| 
       207 
     | 
    
         
            -
                textRectFns.time = rectangleTextRect;
         
     | 
| 
       208 
     | 
    
         
            -
                // 开关
         
     | 
| 
       209 
     | 
    
         
            -
                drawNodeFns.switchs = switchs;
         
     | 
| 
       210 
     | 
    
         
            -
                iconRectFns.switchs = rectangleIconRect;
         
     | 
| 
       211 
     | 
    
         
            -
                textRectFns.switchs = rectangleTextRect;
         
     | 
| 
       212 
200 
     | 
    
         
             
            }
         
     | 
| 
       213 
201 
     | 
    
         
             
            init();
         
     | 
| 
       214 
202 
     | 
    
         
             
            // registerNode: Register a custom node.
         
     | 
| 
         @@ -1,19 +1,17 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            export function arbitraryGraph(ctx, node) {
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
              ctx.beginPath();
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 5 
     | 
    
         
            +
              ctx.lineWidth = 1;
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 7 
     | 
    
         
            +
              for(let i=0,len=node.rect.circles.length; i<len; i++) {
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                ctx.lineTo(node.rect.circles[i].x, node.rect.circles[i].y)
         
     | 
| 
      
 10 
     | 
    
         
            +
              }
         
     | 
| 
       10 
11 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                }
         
     | 
| 
      
 12 
     | 
    
         
            +
              ctx.closePath();
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
                ctx.stroke();
         
     | 
| 
      
 14 
     | 
    
         
            +
              (node.fillStyle || node.bkType) && ctx.fill();
         
     | 
| 
      
 15 
     | 
    
         
            +
              
         
     | 
| 
      
 16 
     | 
    
         
            +
              ctx.stroke();
         
     | 
| 
       19 
17 
     | 
    
         
             
            }
         
     |