<?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[Custom Angular Directives]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I would like to integrate some svg widget into my custom dashboards.</p>
<p dir="auto">I think the best way is to develop custom directive, isn't it?<br />
If so, could you give me some documentation or resources about this kind of stuff?</p>
<p dir="auto">Best,<br />
Matteo.</p>
]]></description><link>https://forum.mango-os.com/topic/2646/custom-angular-directives</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 16:39:39 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2646.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Jan 2017 12:05:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom Angular Directives on Fri, 07 Jul 2017 15:37:24 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your answer <a class="plugin-mentions-user plugin-mentions-a" href="/user/will-geller" aria-label="Profile: Will-Geller">@<bdi>Will-Geller</bdi></a> :)</p>
<p dir="auto">I managed to sort it deleting the 'stroke' properties from the XML definition in Inkscape and using ma-selector and ng-class :)</p>
]]></description><link>https://forum.mango-os.com/post/14842</link><guid isPermaLink="true">https://forum.mango-os.com/post/14842</guid><dc:creator><![CDATA[silvia]]></dc:creator><pubDate>Fri, 07 Jul 2017 15:37:24 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Angular Directives on Thu, 06 Jul 2017 17:49:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/silvia" aria-label="Profile: silvia">@<bdi>silvia</bdi></a> I would not worry about those directive files as they are outdated and I wrote those before we released the <code>&lt;ma-svg&gt;</code> component.</p>
<p dir="auto">We now have <code>&lt;ma-svg&gt;</code> which can be used to link to your svg file and select and style tagged groups or elements within the svg. There is a video tutorial here <a href="https://help.infiniteautomation.com/interactive-svg-graphics/" rel="nofollow ugc">https://help.infiniteautomation.com/interactive-svg-graphics/</a> and two example pages under <code>examples &gt; basics &gt; svg graphics</code> in the app menu.</p>
<p dir="auto">As far as your question regarding SVG stroke, you will want to make sure you are specifically targeting the svg element within the svg as indicated in the video/examples and you should then be able to use <code>ma-selector</code> + <code>ng-class</code> to style the stroke using css. More info on CSS on SVG strokes here: <a href="https://css-tricks.com/almanac/properties/s/stroke/" rel="nofollow ugc">https://css-tricks.com/almanac/properties/s/stroke/</a></p>
<p dir="auto">If you are still having difficulties perhaps you could post your code and attach your svg element and we can help futrher.</p>
]]></description><link>https://forum.mango-os.com/post/14822</link><guid isPermaLink="true">https://forum.mango-os.com/post/14822</guid><dc:creator><![CDATA[Will Geller]]></dc:creator><pubDate>Thu, 06 Jul 2017 17:49:55 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Angular Directives on Tue, 04 Jul 2017 11:52:50 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">'fill' is ok, but not 'stroke' or derivatives.</p>
</blockquote>
<p dir="auto">'stroke' and others are working now.<br />
Inkscape was over-writing the CSS properties, so I deleted all the 'style' properties within Inkscape and now the paths take any options.</p>
<p dir="auto">Still, it'd be good to have a look at your documentation :)</p>
]]></description><link>https://forum.mango-os.com/post/14798</link><guid isPermaLink="true">https://forum.mango-os.com/post/14798</guid><dc:creator><![CDATA[silvia]]></dc:creator><pubDate>Tue, 04 Jul 2017 11:52:50 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Angular Directives on Tue, 04 Jul 2017 11:03:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/will-geller" aria-label="Profile: Will-Geller">@<bdi>Will-Geller</bdi></a> said in <a href="/post/13795">Custom Angular Directives</a>:</p>
<blockquote>
<p dir="auto">2_1486146172329_svgRect.js<br />
1_1486146172329_svgDisplay.js<br />
0_1486146172328_svgCircle.js</p>
</blockquote>
<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/will-geller" aria-label="Profile: Will-Geller">@<bdi>Will-Geller</bdi></a>,</p>
<p dir="auto">The links are broken :(</p>
<p dir="auto">Would it be possible to update them please, as I'm looking into how to change stroke style of a SVG file with CSS styling? 'fill' is ok, but not 'stroke' or derivatives. I might be able to get some ideas from your files.</p>
<p dir="auto">Thanks :)</p>
<p dir="auto">Silvia</p>
]]></description><link>https://forum.mango-os.com/post/14796</link><guid isPermaLink="true">https://forum.mango-os.com/post/14796</guid><dc:creator><![CDATA[silvia]]></dc:creator><pubDate>Tue, 04 Jul 2017 11:03:05 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Angular Directives on Tue, 07 Feb 2017 13:41:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi Jared,<br />
now I am trying to develop custom directive under directive folder. I have some problem with requirejs.<br />
Thanks a lot for your advice, I will take it into account if I cannot develop the directives.</p>
]]></description><link>https://forum.mango-os.com/post/13821</link><guid isPermaLink="true">https://forum.mango-os.com/post/13821</guid><dc:creator><![CDATA[Matteo Cusmai]]></dc:creator><pubDate>Tue, 07 Feb 2017 13:41:27 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Angular Directives on Mon, 06 Feb 2017 19:51:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/matteo-cusmai" aria-label="Profile: Matteo-Cusmai">@<bdi>Matteo-Cusmai</bdi></a> we also have an easier method in the works for including additional AngularJS modules (i.e. directives/components/controllers/filters) into the dashboards app.</p>
]]></description><link>https://forum.mango-os.com/post/13811</link><guid isPermaLink="true">https://forum.mango-os.com/post/13811</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 06 Feb 2017 19:51:52 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Angular Directives on Fri, 03 Feb 2017 18:27:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi Matteo,</p>
<p dir="auto">We are working on creating some SVG components for the post 3.0 releases but in the mean time you could create an SVG directive to do some cool things.</p>
<p dir="auto">Three questions: How interactive do you want to get with the SVG widget? Are you planning on loading custom SVG images prebuilt in a graphics editor? Are you working off of the Admin Template or built in editable pages for your custom dashboards?</p>
<p dir="auto">A while back I worked on some SVG directives and I will attach the code here:</p>
<p dir="auto"><a href="/forum/uploads/files/1486146174499-svgrect.js">2_1486146172329_svgRect.js</a><br />
<a href="/forum/uploads/files/1486146174497-svgdisplay.js">1_1486146172329_svgDisplay.js</a><br />
<a href="/forum/uploads/files/1486146174491-svgcircle.js">0_1486146172328_svgCircle.js</a></p>
<p dir="auto">The rect and circle ones should be pretty straightforward but the svgDisplay is designed to work with a custom SVG image doc that you tag the groups with ids and use those to control stroke and opacity attributes.</p>
<p dir="auto">You will need to put these js files in your js/mango-3.3/directives folder then update  js/mango-3.3/maDashboards.js to import them into the app:<br />
<a href="/forum/uploads/files/1486146398038-madashboards.js">0_1486146395970_maDashboards.js</a></p>
]]></description><link>https://forum.mango-os.com/post/13795</link><guid isPermaLink="true">https://forum.mango-os.com/post/13795</guid><dc:creator><![CDATA[Will Geller]]></dc:creator><pubDate>Fri, 03 Feb 2017 18:27:12 GMT</pubDate></item></channel></rss>