<?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[image rotating well    But not SVG oject]]></title><description><![CDATA[<p dir="auto">Hello,<br />
The following example is taken from a video of mango website showing how to make an image rotating on itself.<br />
It’s possible for me to make an image rotating on its own position, but not for a svg object.</p>
<p dir="auto">The svg objet (called « rotor » in the script code below) is rotating with an offset of several hundreds of pixels.</p>
<p dir="auto"><img src="https://i.imgur.com/vbxqSl4.png" alt="0_1566828102413_anim_ppe2.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I can of course use an image instead of a svg object , but the rotation wil not be exactly at the center of the object, it’s why i think it’s better to do with svg objects .</p>
<p dir="auto">Have you got any idea why is there an offset when rotating ?</p>
<p dir="auto">Where is it possible to find a documetation on the differents properties and method of ma-selector object ?</p>
<p dir="auto">result of the display:</p>
<p dir="auto"><img src="https://i.imgur.com/QWfeKxQ.png" alt="0_1566828383516_anim_ppe.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Best regards</p>
]]></description><link>https://forum.mango-os.com/topic/4420/image-rotating-well-but-not-svg-oject</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 02:49:05 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4420.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Aug 2019 13:55:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to image rotating well    But not SVG oject on Wed, 28 Aug 2019 04:01:05 GMT]]></title><description><![CDATA[<p dir="auto">If at every point you encounter a surprise or frustration, your response is to add it to the blacklist. Furthermore it is common to feel intimidate to journey down that bumpy "road less travel" and easily get burned by incomplete understanding.</p>
<p dir="auto">Mango is awesome. It's easy to learn partially, and much harder to learn completely. Inspiring a strong appreciation for all that Mango is and can do will help in shorten the learning curve and eventually more projects are built on the Mango platform.</p>
]]></description><link>https://forum.mango-os.com/post/23400</link><guid isPermaLink="true">https://forum.mango-os.com/post/23400</guid><dc:creator><![CDATA[Desmond]]></dc:creator><pubDate>Wed, 28 Aug 2019 04:01:05 GMT</pubDate></item><item><title><![CDATA[Reply to image rotating well    But not SVG oject on Tue, 27 Aug 2019 15:59:23 GMT]]></title><description><![CDATA[<p dir="auto">The journey of a thousand miles begins with a single step.</p>
]]></description><link>https://forum.mango-os.com/post/23369</link><guid isPermaLink="true">https://forum.mango-os.com/post/23369</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 27 Aug 2019 15:59:23 GMT</pubDate></item><item><title><![CDATA[Reply to image rotating well    But not SVG oject on Tue, 27 Aug 2019 09:25:10 GMT]]></title><description><![CDATA[<p dir="auto">Hello jared,</p>
<p dir="auto">You said : The gist of it is that ma-selector should be set to a CSS selector,</p>
<p dir="auto">But I don’t  even know how to set the ma-selector to a CSS selector !!</p>
<p dir="auto">Even with the links you gave me , i unable to understand how does it works with mango . (angular JS attributes)</p>
<p dir="auto">Even with the examples given  in mango software I unable to update the code to realise the simple rotating svg object I want.</p>
<p dir="auto">Using scripts is possible for me , but only if it’s not complicated.</p>
<p dir="auto">I suppose i have to learn many things to be able to do a page like that :</p>
<p dir="auto"><img src="https://i.imgur.com/d5NV2mB.png" alt="0_1566898420753_vue_flex.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So, I prefer to stop my involvement in mango.</p>
<p dir="auto">Thanks for your help.</p>
<p dir="auto">Bye</p>
]]></description><link>https://forum.mango-os.com/post/23360</link><guid isPermaLink="true">https://forum.mango-os.com/post/23360</guid><dc:creator><![CDATA[JF89]]></dc:creator><pubDate>Tue, 27 Aug 2019 09:25:10 GMT</pubDate></item><item><title><![CDATA[Reply to image rotating well    But not SVG oject on Mon, 26 Aug 2019 16:22:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jf89">@<bdi>jf89</bdi></a> said in <a href="/post/23318">image rotating well But not SVG oject</a>:</p>
<blockquote>
<p dir="auto">It’s possible for me to make an image rotating on its own position, but not for a svg object.</p>
</blockquote>
<p dir="auto">This is not a true statement.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jf89">@<bdi>jf89</bdi></a> said in <a href="/post/23318">image rotating well But not SVG oject</a>:</p>
<blockquote>
<p dir="auto">Have you got any idea why is there an offset when rotating ?</p>
</blockquote>
<p dir="auto">You have to correctly set the transform-origin CSS property to the center of the SVG element. Note that it works differently for SVG and HTML.<br />
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin" rel="nofollow ugc">https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jf89">@<bdi>jf89</bdi></a> said in <a href="/post/23318">image rotating well But not SVG oject</a>:</p>
<blockquote>
<p dir="auto">Where is it possible to find a documetation on the differents properties and method of ma-selector object ?</p>
</blockquote>
<p dir="auto">There are two examples at<br />
/ui/examples/svg/basic-usage<br />
/ui/examples/svg/interactive-svg</p>
<p dir="auto">The API docs are missing. I will rectify that right now.</p>
<p dir="auto">The gist of it is that <code>ma-selector</code> should be set to a CSS selector, this selector is used to locate elements in the SVG and apply other attributes to them.<br />
See<br />
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector" rel="nofollow ugc">https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector</a><br />
<a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Selectors" rel="nofollow ugc">https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Selectors</a></p>
]]></description><link>https://forum.mango-os.com/post/23327</link><guid isPermaLink="true">https://forum.mango-os.com/post/23327</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 26 Aug 2019 16:22:07 GMT</pubDate></item></channel></rss>