• J
    James

    I'm trying to create a button which is when button clicked it will set multiple point values. I look for relevant question in this forum, unfortunately it doesnt work for me. Any help is very appreciated. Here is my code.

     <a id="476838d4-4ac0-4562-84c8-787a0f341fc1" style="position: absolute; left: 806px; top: 86px; width: 221.266px; height: 44.9063px; z-index: 3; color: rgba(255,56,47);" href="#" onclick="call_this()">Occupied</a>
         
        <script type="text/javascript">
           function call_this()
           {
               var tags = com.serotonin.m2m2.db.dao.DataPointTagsDao.instance.getTagsForDataPointId( p.getDataPointWrapper().getId() );
               var newTags = {"tags.TmpSpvCoSpvClg":"20"};
                    CONTEXT_POINTS.p.getVO().setTags(newTags); 
                    com.serotonin.m2m2.db.dao.DataPointDao.instance.saveDataPoint(CONTEXT_POINTS.p.getVO());
                
           
           }
    

    posted in User help read more
  • J
    James

    @phildunlap problem solved, I used event handler to make a schedule instead. Thank a lot for your help!

    posted in Mango Automation general Discussion read more
  • J
    James

    @CraigWeb Thank you so much for letting me know there is such website exists. It helps me a lot.

    posted in User help read more
  • J
    James

    Hi, any method to make full page automatically scaled to fit any screen resolution.
    I did some code but it doesnt work.

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
    

    posted in User help read more
  • J
    James

    I would like to ask if I can set schedule to set value for specific xid on Mango v3.5.6.

    posted in Mango Automation general Discussion read more
  • J
    James

    @Jared-Wiltshire Thank you for you supporting. It works perfectly.
    Here is my script: :D

    <!---------Rotation----------->
        <ma-svg ng-include="'/rest/v2/file-stores/default/case.svg'" style="width: 1114.022px; height: 399.399px; position: relative; position: absolute; left: 150px; top: 180px; ">
           
               <div ma-selector="#ahufan" ng-class="{'ma-spin-clockwise': vfd.value>0}" style="transform-origin: 193.32843px 114.53712px" ng-style="{'animation-duration': 50/(vfd.value - vfd.value % 10) + 's'}"></div>
        </ma-svg>
    

    posted in Mango Automation general Discussion read more
  • J
    James

    @Jared-Wiltshire Thank you for your help. I still got issues. Fan wont be spinning with

    ng-class="{'ma-spin-clockwise': vfd.value > 0}
    

    and it is not spinning at reading value once I put transform-origin in it.
    how to pass value into svg?
    here is my code.

    <div class="ma-designer-root" id="dfe09a12-af99-46a4-8389-c35987e89466" style="width: 1000.95px; height: 796.938px; position: relative;">
       
        <!--- Get Point Value-->
        <!--- Get VFD--->
        <ma-get-point-value id="18581801-eeaf-4f9d-bc58-ac2a7879cd3a" style="position: absolute; left: 0px; top: 0px;" point-xid="DP_18b9824d-32a1-4cf2-91a2-7154d30971c6" points="vfd"></ma-get-point-value>
    
    <ma-svg ng-include="'/rest/v2/file-stores/default/case.svg'" style="width: 1114.022px; height: 399.399px; position: relative; position: absolute; left: 0px; top: 0px; ">
           
               <div ma-selector="#ahufan" ng-class="{'ma-spin-clockwise': true}" style="transform-origin: 193.24985px 113.670235px" ng-style="{'animation-duration': 50/(vfd.value - vfd.value % 10) + 's'}"></div>
        </ma-svg>
    

    posted in Mango Automation general Discussion read more
  • J
    James

    Hello, finally I got it worked but any method to make it rotate from its center
    Thank you in advance```
    //your code here

     <!--- VFD Rotation--->
        <ma-svg ng-include="'/rest/v2/file-stores/default/case.svg'" style="width: 1000px; height: 800px; position: relative; position: absolute; left: 500px; top: 143px;">
            <div ma-selector="#image1269" ng-class="{'ma-spin-clockwise': true}" ng-style="{'animation-duration' : 50/(vfd.value - vfd.value%10)+0 +'s','origin': '0px 0px'}"></div>
        </ma-svg>
        <ma-point-value id="9cf0c356-f48e-4670-99fc-d78ae9c436bf" enable-popup="hide" style="position: absolute; left: 560px; top: 136px;" point-xid="DP_18b9824d-32a1-4cf2-91a2-7154d30971c6" label="VFD Speed"></ma-point-value>
        <img id="e18ed833-b486-4919-b33a-9b5a0c86a6ef" style="position: absolute; left: 146px; top: 265px;">

    posted in Mango Automation general Discussion read more
  • J
    James

    It doesn't work for me for some reasons. here is my code.

    <ma-svg class="ventilo" id="a3352242-ae43-409c-9d8d-8ff863353339" ng-include="'/rest/v2/file-stores/default/drawing.svg'" style="position: absolute; width: 230px; height: 230px; left: 325px; top: 149px;" ng-style="{'animation-duration': 50 / (rotate.value - rotate.value % 10) + 0 + 's'}">
             <div ma-selector="#Pales" ng-class="{'ma-spin-counterclockwise': false, 'ma-spin-clockwise': true}" ng-style="{'animation-duration': 50 / (rotate.value - rotate.value % 10) + 0 + 's'}"></div>
        </ma-svg>
    

    Also how to create a class named "ventilo".

    posted in Mango Automation general Discussion read more
  • J
    James

    Hello, I'm very new to HTML/CSS/AngularJS. I would like to ask if there is any method to link fan speed to the rotation of image.

    posted in Mango Automation general Discussion read more
  • J
    James

    It works! Thank you for your help.

    posted in User help read more
  • J
    James

    Hello guys, I'm currently working on bacnet ip. I can't set set point value because it gray out. How do I fix this?

    posted in User help read more