Commons of edge SVG - how to reference an SVG element directly without a click or mouse over the event?
I went through this tutorial to interact with the SVG files...
http://www.YouTube.com/watch?v=4UEB6gaLKuw
.. .and it was great. The example worked perfectly, and I was able to replicate the functionality in my own project.
However, the example requires that there is a "select" event in the SVG file and an event listener in the Edge file animate. I'm dealing with a slightly different scenario, and I would like your help to understand.
I have a card SVG of the USA, and when loading the map, I would like each State (separated in the SVG elements) color differently based on the data in the file Edge animate. Copy the following code in the tutorial refers to an element when it is passed in the select event...
EC. . Done () SVG.accessSVG (sym.$("USA_Map_blue2"))
{function (svgDocument)}
Add the event listener
svgDocument.addEventListener ("select", {function (event)}
Remember selected state
sym.setVariable ("selectedState", event.target);
Show selected state
SYM.$("selectedStateTxt").html (Event.Target.ID);
});
}
);
.. But how can I make reference to an SVG element directly on load without an event trigger?
I thought about using something like:
Penn var = svgDocument.getElementByID ("pennsylvania");
$(penn) .css ("fill",("#00ff00"));
But this doesn't seem to work.
Your help is greatly appreciated!
Hi Fred,.
Thanks for the comments. You can use jQuery to put the hand in of the SVG DOM as well. Here's an example of my next side project animate Cookbook (will be published shortly on EdgeDocks.com). It shows an interactive map of the United States.
The source code looks like this:
It's basically simple jQuery with a context (the context of the SVG document).
You can use something like this to access nodes (for example the path) in your animated model:
$("path",_svgDocument).css ("fill", "#770000"); changes the color of all THE nodes in the path
$("#some_id",_svgDocument).css ("fill", "#770000"); changes the color of a specific id
I hope this helps. If you like my work as open source, please spread the word
Simon Widjaja
Adobe Certified Expert (ACE)
Adobe certified instructor (ACI)
++++
EdgeDocks.com - all Edge: tutorials, components, Extensions
++++
Tags: Edge Animate
Similar Questions
-
I have Adobe Photoshop Elements 9 for Mac and I changed my iMac and I don't have any CD player on my new Mac! How can I install PS elements 9 without a CD player? Can I download it? I prefer not having to buy a new one! Thank you for your help
Hi Nathalie,.
You can download no doubt
The download link is available here: https://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-7-8-9-downloads.html
Let us know if this helps!
Kind regards
Aurélie hamadi
-
I'm new in the first pro around the navigation that I play with her. I clicked alt + c and 'razor' appeared when I move the mouse over the time line. How can I put it back to original settings?
Press the "v".
MtD
-
How can I install photoshop elements 13 without disk? I had the program as a gift but is not an option of drive on my laptop
PES 10, 11, 12, 13 - https://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-downloads.html
You can also download the demo version of the software through the page linked below and then use your current serial number to activate it.
Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.
Photoshop/Premiere Elements 13: http://prodesigntools.com/photoshop-elements-13-direct-download-links-premiere.html
-
How can I download Photoshop elements 12 without a DVD drive?
How can I download Photoshop elements 12 without a DVD drive? I use a MAC
Hi garden,.
You can download the trial of 12 Photoshop elements version and activate it with your serial number
Download link - http://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_elements&loc=en
Let me know if you need more information.
Thank you!
Florianne
-
How to control a VI (with a while loop and a structure of the event) from an another VI
Hello
I have the main VI which I want to be driven from an another VI. But I can't do that and I don't know what is happening.
For example: VI main, I have a while loop with a structure of the event, there is a Boolean controller controlling a Boolean LED, which is inside the structure of the event. And the other VI, there is just a Boolean controller and functions of applications to open the main VI.
How can I control the Boolean LED in VI main, changing the State of the Boolean controller in an another VI?
Thank you.
There are different options, but depending on what you want to do. For this example I can't give you a specific solution.
I do not understand why you do what you do. Why do you call your 'principle VI' dynamically? What is the advantage to do? There are also other ways to call a VI dynamically, based on real cases (for example the method "call and forget", etc...).
In you principle VI, control you Boolean ("THATCHER") is not the case of corresponding event. This is not usually a good practice, keep it inside.
Also, why you try to communicate with the caller and callee VI through such a way to twist? There are better ways to do it.
In one of my projects, I use the user event to launch orders in case of case of appellant VI.
some Associates more readings for you:
http://www.notatamelion.com/2015/03/23/how-to-make-dynamic-subvis/
-
How can I get the image of the Web page when my mouse over the icon in the taskbar?
I used to get the image of some Web pages I look at one when I spent my mouse on the browser used in the taskbar, now, I only get the Scripture that says what pages are open, how to get back the images? It facilitated visually for me to see.
Hello
Are you referring to the feature Aero Peek in Windows 7?
You can use Aero Peek to take a quick look at other open windows without clicking away from the window you are currently working. For more information, see Preview an open window on the desktop using Peek.
You may experience this problem if PEAK Aero is disabled on the computer.
If you can not see the effects of glass window, or if you are unable to use Aero Peek and Aero Shake, use the Aero troubleshooting tool to diagnose and fix the problem automatically.
Solve problems Aero in Windows 7
http://support.Microsoft.com/kb/976170
You can also go to the Control Panel - Performance and options (find it by typing in the search box) - and set for the "look better".
I hope this helps. If you need help with Windows, let us know and will be happy to help you.
-
How can I view all content without constantly clicking on show all the content?
When I opened one of my games on chess.com I get a notice that "only the secure content" so I click on "view all content" when I go to a second game, I receive a notice indicating that "only the secure content" if I click on "display all content" when I opened a third game I get a notice that "only the secure content" so I click on "display all content» When I opened a fifth game I get a notice that "only the secure content" so I click on "view all content" when I opened a sixth game I get a notice that "only the secure content" so I click on "view all content. Why is there no option to just show all the default content?
Also when I opened a window of analysis on chess.com why don't can't I maximise?
Hello
We would like to learn more about the issue. What browser are you using when the issue occurred? If you use Internet Explorer, please see this link for steps on how to enable/disable/prompt the message "appears only the secure content.
Please let us know how it goes for help us to you more.
-
Help: how to install PS and elements PR without CD?
I have adobe photoshop elements 10 & first 10 items, how to inastall without using the cd? I have the serial number.
You can download here:
-
How can I stop Firefox access to the content of the web pages when I mouse over the link?
I have disable link prefetching and yet Firefox beta version for OSX 29,0 always tries to access a web page when I move the mouse over a link on a Web page.
-
When I hover over a word or an expression that has a double line below, a suggestion box comes with a link that takes me to a site that is in regards to the word or phrase that I flew over.
Hello kayjay76, this looks like a problem caused by some sort of adware on your pc. Please go to firefox > addons > extensions and remove any suspicious entries (toolbars, the things that you have not installed intentionally, I don't know what purpose they serve, etc.). also, go to the windows control panel / programs and remove all toolbars or potentially unwanted software from there and run a full scan of your system with the security software you have in place and various other tools such as the free version of malwarebytes & adwcleaner.
Remove a toolbar that has supported your Firefox or the homepage search
Fix Firefox problems caused by malicious software -
Already tried disabling all modules in safe mode.
Thank you
Hello
Please try to set browser.chrome.toolbar_tips to false in Firefox Subject: config
-
How stop list tabs when I move the mouse over the icon in the task bar of Firefox?
After the upgrade to FF6.01 and play a little with the new groups tab feature, now whenever I have pass the mouse on taskbar icon, all tabs are presented separately. I would go back to show only one tab open the Firefox browser.
In the Firefox options and the tabs Panel, see if you see the tab found in the Windows taskbar archived.
-
How can I resize a table directly (without using the table to remodel)?
Hello world
I have a porgam in which I use a table as a command (with specific values that goes from the user before running the program). By mistake at the beginning, I created a table of 4 dimension (for example), but I didn't because I was showing only the first 3 values (not to expand the table to 4 or more). I would now like to change the size of the array of 4-3. I don't seem to be able to find an option (right click on the table) which allows me to do so directly. I don't want to use the icon "reshape the table", because it is not what I want to do. I hope I am clear enough.
Thanks for any help,
Kind regards
Marc
- Right click on the additional array element, then... Select 'delete data operations.
- Now go to the menu bar and not "current default values edit..make'
- Save the VI.
-
How can I get photoshop elements 11 on my computer if I have the serial number?
I lost in a restart and need to reinstall it
If you follow the 7 steps, you can download a trial through one of the links on this page using a browser that accepts cookies: http://prodesigntools.com/photoshop-elements-11-direct-download-links-pse-premiere-pre.htm l
and activate it with your serial number.
If you have a problem downloading, you don't follow all 7 steps. as a general rule, do not carefully follow steps 1, 2 or 3 is the problem, but your browser must also allow cookies (a setting of restrictive browser) is another potential source of problems.
Maybe you are looking for
-
When I click on a window it does not come to the front
If I have 3 windows open, they overlap, if I click the back one, remains in the back, I want to show him to the front, so I can read.It remains in the front and slide the others behind it.
-
I use Roboform constantly. I understand that my (7.x.x) version is not yet supported in Firefox 7, but somehow the update of Firefox was triggered in a moment of unconsciousness. Could not find a way to restore Firefox 6 until compatibility issues ar
-
My friend has an iPhone, but switched to an android. Now, every time that I send him a message it sends as an IMessage, I know that I can hold and press 'Send as Message text', but I don't want to do this every time I text him. How I put it so it sen
-
Write to the file in spreadsheet that VI is not add
See attached vi. I logged a bunch of data into excellent .xls file, and then restart the vi and sign again in the same xls file, but I noticed the new data do not add to the file existing, but replace all the old data In my writing file vi spreadshee
-
I have Windows XP on my desktop. Recently, I downloaded and installed Internet Explorer 8. Since then I couldn't send or receive e-mail. I checked with Verizon and after much research, they said it's a problem with Internet Explorer. What should