<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Rotating Fan]]></title><description><![CDATA[<p dir="auto">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.</p>
]]></description><link>https://forum.mango-os.com/topic/4133/rotating-fan</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 23:52:04 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4133.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Apr 2019 02:54:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Rotating Fan on Tue, 23 Apr 2019 03:23:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jared-wiltshire" aria-label="Profile: Jared-Wiltshire">@<bdi>Jared-Wiltshire</bdi></a> Thank you for you supporting. It works perfectly.<br />
Here is my script: :D</p>
<pre><code>&lt;!---------Rotation-----------&gt;
    &lt;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; "&gt;
       
           &lt;div ma-selector="#ahufan" ng-class="{'ma-spin-clockwise': vfd.value&gt;0}" style="transform-origin: 193.32843px 114.53712px" ng-style="{'animation-duration': 50/(vfd.value - vfd.value % 10) + 's'}"&gt;&lt;/div&gt;
    &lt;/ma-svg&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/21925</link><guid isPermaLink="true">https://forum.mango-os.com/post/21925</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Tue, 23 Apr 2019 03:23:16 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Tue, 09 Apr 2019 15:25:02 GMT]]></title><description><![CDATA[<ul>
<li><code>ma-selector="#ahufan"</code> - this is a different ID to the one that was in the SVG that you sent me</li>
<li><code>points="vfd"</code> this is wrong, it should be <code>point="vfd"</code></li>
</ul>
]]></description><link>https://forum.mango-os.com/post/21781</link><guid isPermaLink="true">https://forum.mango-os.com/post/21781</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 09 Apr 2019 15:25:02 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Tue, 09 Apr 2019 09:47:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jared-wiltshire" aria-label="Profile: Jared-Wiltshire">@<bdi>Jared-Wiltshire</bdi></a>  Thank you for your help. I still got issues. Fan wont be spinning with</p>
<pre><code>ng-class="{'ma-spin-clockwise': vfd.value &gt; 0}
</code></pre>
<p dir="auto">and it is not spinning at reading value once I put transform-origin in it.<br />
how to pass value into svg?<br />
here is my code.</p>
<pre><code>&lt;div class="ma-designer-root" id="dfe09a12-af99-46a4-8389-c35987e89466" style="width: 1000.95px; height: 796.938px; position: relative;"&gt;
   
    &lt;!--- Get Point Value--&gt;
    &lt;!--- Get VFD---&gt;
    &lt;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"&gt;&lt;/ma-get-point-value&gt;

&lt;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; "&gt;
       
           &lt;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'}"&gt;&lt;/div&gt;
    &lt;/ma-svg&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/21780</link><guid isPermaLink="true">https://forum.mango-os.com/post/21780</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Tue, 09 Apr 2019 09:47:31 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Mon, 08 Apr 2019 21:09:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: James">@<bdi>James</bdi></a> Thanks for sending the SVG. You need a transform origin like this - <code>style="transform-origin: 190.5216px 113.70395px"</code>, that is the x attribute + half the width, and the y attribute + half the height.</p>
<p dir="auto">Full example using your image -</p>
<pre><code>&lt;div class="ma-designer-root" id="a0146b73-5624-4797-8227-a61cdbfe640f" style="width: 1366px; height: 768px; position: relative;"&gt;
    &lt;ma-svg id="949e7957-38dc-43b9-932c-97eadd759da3" style="position: absolute; left: 0px; top: 0px;" ng-include="'/rest/v2/file-stores/public/case.svg'"&gt;
        &lt;div ma-selector="#fan" ng-class="{'ma-spin-clockwise': vfd.value &gt; 0}" style="transform-origin: 190.5216px 113.70395px" ng-style="{'animation-duration': 50 / (vfd.value - vfd.value % 10) + 's'}"&gt;&lt;/div&gt;
    &lt;/ma-svg&gt;
    &lt;md-slider id="1d33a668-f519-4292-9c17-fe3a8aba4644" style="position: absolute; left: 560px; top: 50px;" ng-model="vfd.value" ng-init="vfd.value = 50"&gt;&lt;/md-slider&gt;
    &lt;div id="0400c32f-f356-4099-9bf3-d0c735df0b4f" style="position: absolute; left: 603px; top: 98px;" ng-bind="vfd.value | number:1"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/21774</link><guid isPermaLink="true">https://forum.mango-os.com/post/21774</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 08 Apr 2019 21:09:49 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Fri, 05 Apr 2019 16:09:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: james">@<bdi>james</bdi></a> said in <a href="/post/21743">Rotating Fan</a>:</p>
<blockquote>
<p dir="auto">Hello, finally I got it worked but any method to make it rotate from its center</p>
</blockquote>
<p dir="auto">See Craig's response above, you need a <code>transform-origin</code>.<br />
Please post your SVG as requested if you need help with this.</p>
]]></description><link>https://forum.mango-os.com/post/21747</link><guid isPermaLink="true">https://forum.mango-os.com/post/21747</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Fri, 05 Apr 2019 16:09:34 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Fri, 05 Apr 2019 08:37:09 GMT]]></title><description><![CDATA[<p dir="auto">Hello, finally I got it worked but any method to make it rotate from its center<br />
Thank you in advance```<br />
//your code here</p>
<pre><code> &lt;!--- VFD Rotation---&gt;
    &lt;ma-svg ng-include="'/rest/v2/file-stores/default/case.svg'" style="width: 1000px; height: 800px; position: relative; position: absolute; left: 500px; top: 143px;"&gt;
        &lt;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'}"&gt;&lt;/div&gt;
    &lt;/ma-svg&gt;
    &lt;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"&gt;&lt;/ma-point-value&gt;
    &lt;img id="e18ed833-b486-4919-b33a-9b5a0c86a6ef" style="position: absolute; left: 146px; top: 265px;"&gt;</code></pre>
]]></description><link>https://forum.mango-os.com/post/21743</link><guid isPermaLink="true">https://forum.mango-os.com/post/21743</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Fri, 05 Apr 2019 08:37:09 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Thu, 04 Apr 2019 16:23:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: James">@<bdi>James</bdi></a> post a link / send me a link to the SVG you are using and I'll help you out.</p>
]]></description><link>https://forum.mango-os.com/post/21730</link><guid isPermaLink="true">https://forum.mango-os.com/post/21730</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Thu, 04 Apr 2019 16:23:45 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Thu, 04 Apr 2019 09:03:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi James</p>
<p dir="auto">I would suggest brushing up on your HTML and CSS first before trying to do this.  Unfortunately, you can't copy that code verbatim.<br />
You can add your own CSS classes in a <code>&lt;style&gt;&lt;/style&gt;</code> tag.<br />
Here are some videos on how to use the ``&lt;ma-svg&gt;``` component.<br />
<iframe class="vimeo-embed" src="//player.vimeo.com/video/250518111" width="640" height="360" frameborder="0"></iframe><br />
<iframe class="vimeo-embed" src="//player.vimeo.com/video/235809394" width="640" height="360" frameborder="0"></iframe><br />
<iframe class="vimeo-embed" src="//player.vimeo.com/video/221022991" width="640" height="360" frameborder="0"></iframe></p>
<p dir="auto">I have modified the basic SVG example in the MA examples for you so you can copy it and experiment.</p>
<pre><code>&lt;ma-get-point-value point-xid="SVG-Demo-Status" point="indicatorStatus"&gt;&lt;/ma-get-point-value&gt;


&lt;div layout layout-align="start center"&gt;
    &lt;h3 flex&gt;
        Indicator Status: {{indicatorStatus.renderedValue}}
    &lt;/h3&gt;
    &lt;md-checkbox ng-model="page.spin" ng-init="page={}"&gt;
        Reverse the Spin!
    &lt;/md-checkbox&gt;
&lt;/div&gt;

&lt;ma-svg ng-include="'/modules/mangoUI/web/img/status-panel.svg'"&gt;
    &lt;div ma-selector="#indicator" ng-style="{'fill': indicatorStatus.value === 1 ? 'salmon' : indicatorStatus.value === 2 ? 'turquoise' : 'none'}"&gt;&lt;/div&gt;
    &lt;div ma-selector="#spinner" ng-class="{'ma-spin-clockwise': true}" ng-style="{'animation-duration': 10 + 's', 'transform-origin': '150px 300px'}"&gt;&lt;/div&gt;
&lt;/ma-svg&gt;
</code></pre>
<p dir="auto">You can change the animation-duration to a higher value and you will see that it slows down.<br />
You can then replace the number with a variable and do some maths to change the speed.<br />
Ignore the transform-origin for now, what it is doing is making sure the actual element that is spinning is spinning on its own axis.</p>
]]></description><link>https://forum.mango-os.com/post/21729</link><guid isPermaLink="true">https://forum.mango-os.com/post/21729</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Thu, 04 Apr 2019 09:03:35 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Thu, 04 Apr 2019 06:39:19 GMT]]></title><description><![CDATA[<p dir="auto">It doesn't work for me for some reasons. here is my code.</p>
<pre><code>&lt;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'}"&gt;
         &lt;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'}"&gt;&lt;/div&gt;
    &lt;/ma-svg&gt;
</code></pre>
<p dir="auto">Also how to create a class named "ventilo".</p>
]]></description><link>https://forum.mango-os.com/post/21727</link><guid isPermaLink="true">https://forum.mango-os.com/post/21727</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Thu, 04 Apr 2019 06:39:19 GMT</pubDate></item><item><title><![CDATA[Reply to Rotating Fan on Thu, 04 Apr 2019 05:43:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi James</p>
<p dir="auto">There definitely is a way.  If you look at this forum post here : <a href="https://forum.infiniteautomation.com/topic/4070/rotate-svg" rel="nofollow ugc">https://forum.infiniteautomation.com/topic/4070/rotate-svg</a></p>
<p dir="auto">Specifically these lines in the code</p>
<pre><code>     &lt;!--Image Ventilateur + Rotation en fonction de valeur vitesse  --&gt;
    &lt;ma-svg class="ventilo" id="a3352242-ae43-409c-9d8d-8ff863353339" ng-include="'/modules/mangoUI/web/img/Perso/Ventilateur.svg'" style="position: absolute; width: 230px; height: 230px; left: 95px; top: 50px;"&gt;
         &lt;div ma-selector="#Pales" ng-class="{'ma-spin-counterclockwise': false, 'ma-spin-clockwise': true}" ng-style="{'animation-duration': 50 / (Vitesse.value - Vitesse.value % 10) + 0 + 's'}"&gt;&lt;/div&gt;
    &lt;/ma-svg&gt;
</code></pre>
<p dir="auto">The 'speed' of the spin will be the animation-duration as you can see a data points value is being used to calculate the speed of the spin.</p>
]]></description><link>https://forum.mango-os.com/post/21726</link><guid isPermaLink="true">https://forum.mango-os.com/post/21726</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Thu, 04 Apr 2019 05:43:00 GMT</pubDate></item></channel></rss>