jj72ny Posted November 22, 2012 Share Posted November 22, 2012 I have been playing around with google's svg editor and was wondering if it's posible to put a pre slected background on the canvis that could be further edited by user. and can this background be changed by way of a slector link with out having the program on websight twice. ie if a user clicks on a link to square background it goes to svg editor with the square background or user clicks on circle link and it goes to svg editor with a circle background Link to comment Share on other sites More sharing options...
justsomeguy Posted November 26, 2012 Share Posted November 26, 2012 I don't see a reason why those things would not be possible. If you can set a background then you can set a default background when it loads. Link to comment Share on other sites More sharing options...
jj72ny Posted December 4, 2012 Author Share Posted December 4, 2012 Ok so I have spent every last spare minute trying to figure out how to do this and can't find the place to put it or anything on the web about it either so how do I do it Link to comment Share on other sites More sharing options...
justsomeguy Posted December 4, 2012 Share Posted December 4, 2012 I would need to see your code or the documentation you're using to answer questions like that. Link to comment Share on other sites More sharing options...
jj72ny Posted December 5, 2012 Author Share Posted December 5, 2012 Unfourtanatly I have about 5 copy's on puter and non of them work cuz I have played around with them too much I screwed the last one up lastnight but it can be downloaded here http://code.google.com/p/svg-edit/downloads/list or you can look at it on my temp websight athttp://jjshed.site11.com/svg-edit-2.5.1/svg-editor.html if you go to http://jjshed.site11.com you'll see a toolbar hover on u design it and click on yard signs this is where I'd like to put the links to use the different background hope that makes cence Link to comment Share on other sites More sharing options...
Icahbanjarmasin Posted December 5, 2012 Share Posted December 5, 2012 It's article smart really I like it,I am have problem my site no SEO I am no undestand..why..? it's my site http://www.icahbanjarmasin.com please help me my friend. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 5, 2012 Share Posted December 5, 2012 If I open the svg-editor.js file and search for background, it looks like this is how you set a background URL: setBackground(defaultPrefs.bkgd_color, $.pref('bkgd_url')); The second value is the URL that you want to use, the first is a background color. It looks like there is also a way to embed the editor in an iframe instead of having it in a new page. Link to comment Share on other sites More sharing options...
jj72ny Posted December 5, 2012 Author Share Posted December 5, 2012 Ok so now how can I make that change with a button or a link from my menu bar Link to comment Share on other sites More sharing options...
jj72ny Posted December 5, 2012 Author Share Posted December 5, 2012 From out side the program Link to comment Share on other sites More sharing options...
justsomeguy Posted December 5, 2012 Share Posted December 5, 2012 According to the browser's developer tools, it looks like that function is window.svgCanvas.setBackground. You can see it defined on line 2357 of the svg-editor.js code if you want to see what it does or what it expects. You call that function from a button or link the same way you call any other Javascript function. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now