<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: hook into (custom) tooltip display? in Tools</title>
    <link>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572165#M385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this works fine and as you say the tooltips still work (although you loose the circular highlight around the node, but I can live without this!).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Dec 2015 11:24:53 GMT</pubDate>
    <dc:creator>jawalke2</dc:creator>
    <dc:date>2015-12-24T11:24:53Z</dc:date>
    <item>
      <title>hook into (custom) tooltip display?</title>
      <link>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572162#M382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another quick question: I'm using custom tooltips per the example (all good), I'd like to be able to call functions elsewhere in my app whenever a node is clicked on / the tooltip presented - is there an easy way to hook into this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 17:25:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572162#M382</guid>
      <dc:creator>jawalke2</dc:creator>
      <dc:date>2015-12-18T17:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: hook into (custom) tooltip display?</title>
      <link>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572163#M383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi James,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to interact with external objects (outside NeXt), you may define global functions or functions that are visible inside a NeXt's scope. Another nice way around it is to use AngularJS (it especially comes to the rescue in complex apps). You may define controllers and directives and determine the way to interact between scopes within each '$scope'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fire this function you might want to use custom scenes. Here's an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14505566089569185" jivemacro_uid="_14505566089569185"&gt;
&lt;P&gt;nx.define('CustomScene', nx.graphic.Topology.DefaultScene, {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'methods': {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; clickNode: function(sender, node){&lt;/P&gt;
&lt;P&gt;&amp;nbsp; alert('node is clicked');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; },&lt;/P&gt;
&lt;P&gt;&amp;nbsp; clickLink: function(sender, link){&lt;/P&gt;
&lt;P&gt;&amp;nbsp; alert('link is clicked');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will override default methods, therefore tooltips won't be shown by click. If you need them, I'll follow up with this for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the scene is defined, you should register and activate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14505566089514068" jivemacro_uid="_14505566089514068"&gt;
&lt;P&gt;topo.on('topologyGenerated', function(sender, event) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sender.registerScene('ce', 'CustomScene');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sender.activateScene('ce');&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;topo is an initialized nx.graphic.Topology object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Dec 2015 20:03:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572163#M383</guid>
      <dc:creator>alzverev</dc:creator>
      <dc:date>2015-12-19T20:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: hook into (custom) tooltip display?</title>
      <link>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572164#M384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following up your email (you wanted to display tooltips and hook an event at the same time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a mistake saying that you wouldn't be able to see tooltips. Actually you will.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 18:35:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572164#M384</guid>
      <dc:creator>alzverev</dc:creator>
      <dc:date>2015-12-22T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: hook into (custom) tooltip display?</title>
      <link>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572165#M385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this works fine and as you say the tooltips still work (although you loose the circular highlight around the node, but I can live without this!).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2015 11:24:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/hook-into-custom-tooltip-display/m-p/3572165#M385</guid>
      <dc:creator>jawalke2</dc:creator>
      <dc:date>2015-12-24T11:24:53Z</dc:date>
    </item>
  </channel>
</rss>

