Re: [svg-developers] IE9 and Quirks

2011-09-14 Thread Jeff Schiller
Can you explain how you're serving your document, what kind it is and what DOCTYPE you're including? On Wed, Sep 14, 2011 at 7:34 PM, Chris Peto wrote: > ** > > > Hi, > > I don't understand why IE9 goes to IE 9 Quirks mode, instead of IE9 > standard, since svg is implemeted!? > > I have to go to

[svg-developers] IE9 and Quirks

2011-09-14 Thread Chris Peto
Hi, I don't understand why IE9 goes to IE 9 Quirks mode, instead of IE9 standard, since svg is implemeted!? I have to go to F12 then IE9 standard. Can anyone explain that or tell me how to get it to go normal IE? Mit freundlichen Grüßen/Regards Chris Peto Freelance System Developm

RE: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Chris Peto
Well, I have written SVG/javascript for many years and have found that, now, most do, but at certain times did not. So, to be safe, I use all of the below, because you never know what a customer has installed. -Original Message- From: svg-developers@yahoogroups.com [mailto:svg-developers@

Re: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Jacob Beard
Hi, The linked example is not meant to work cross-browser, but it demonstrates the technique of rolling your own simple focus system using script, such that individual elements are capable of receiving keyboard events, and that technique can be applied across different SVG implementations. Jake

Re: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Jacob Beard
Are there browsers that support SVG that do not also support addEventListener? On Wed, Sep 14, 2011 at 10:06 PM, Chris Peto wrote: > > > Hi, > > Yes, I use "addEventListener" too, but to make sure that in "all" browsers > (old and new) it works as I have stated. > > > " Using DOM level 0 interfac

RE: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Chris Peto
Hi, Yes, I use "addEventListener" too, but to make sure that in "all" browsers (old and new) it works as I have stated. " Using DOM level 0 interfaces (e.g. get/setAttribute) for registering event listeners seems novel, but I have never seen it used in practice. Does it have any advantages over a

RE: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Chris Peto
Hi, Probably more helpful is the explanation of "then in use": then in use: XXX.prototype.onMouseDown = function(evt) { if(getFocus() != this) setFocus(this); ... } Hope that helps, if not feel free to ask. Cheers, Chris From: svg-developers@yahoogroups.com [ma

RE: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Chris Peto
Hi, I have my own focus system: //widget focusing var gFocusObj = null; function getFocus() { return gFocusObj; } //-- -- function setFocus(newfocusobject) { if(gFocusObj && gFocusObj.killFocus)

[svg-developers] Re: No Keyboard Events

2011-09-14 Thread dark3251
That's very cool but I'm not really interested in something browser specific. Also, i searched everywhere through that code and found no mention of the SVG focus events. Every element has the onfocusin event but yet every description of it in documentation is very vague and I can find no example

Re: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Bjoern Hoehrmann
* Jacob Beard wrote: >Third, in your example, is it really necessary to prefix "ecmascript" to the >callback function name? My understanding is that, as opposed to clicking a >link with an "ecmascript" or "javascript" URI handler, the string contents >of on* attributes will simply be evaled in the

Re: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Jacob Beard
Hi, Just a few notes about your example. First, I believe you should use document.documentElement as opposed to document.rootElement. Second, I think addEventListener is the recommended method for registering event listeners on DOM nodes: https://developer.mozilla.org/en/DOM/element.addEventList

RE: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Chris Peto
Hi, You will find that these work for all browsers: document.rootElement.setAttribute("onkeypress","ecmascript:gKeyPress(evt);") ; document.rootElement.setAttribute("onkeydown","ecmascript:gKeyDown(evt);"); document['onkeypress'] = gKeyPress; document['onkeydown'] = gKeyDown; functio

Re: [svg-developers] Re: No Keyboard Events

2011-09-14 Thread Jacob Beard
You can implement your own focus system. For example, see the following example comprising two editable text areas (Firefox only): http://live.echo-flow.com/experimental/vi-everywhere/multi-editor.svg Jake On Wed, Sep 14, 2011 at 8:06 PM, dark3251 wrote: > > > Interesting. I could just keep tra

[svg-developers] Re: No Keyboard Events

2011-09-14 Thread dark3251
Interesting. I could just keep track of the last element clicked or something similar. Certainly not ideal but I can live with that until something better comes along. So what would be the actual function of these focus events if there are no built in keyboard events? I did a quick test but i c

Re: [svg-developers] Accurate thumbnails

2011-09-14 Thread Jeff Schiller
Would something like PhantomJS help: http://code.google.com/p/phantomjs/ ? Jeff On Sun, Sep 11, 2011 at 9:11 AM, matthias_moran wrote: > ** > > > Is it possible for a server process to generate accurate bitmap thumbnails > of large svg documents ? > > I've looked at ImageMagik which can use libr

Re: [svg-developers] Re: SVG scripting support for IDE

2011-09-14 Thread Zdeněk Kedaj
Thanks for your page, it could be helpful in the future, but for now I had some closer integration with the IDE on my mind. My tools can offer me some generic javascript methods available in ecmascript, methods from "dhtml", properties like "innerWidth" and I would like to get similar code completi

Re: [svg-developers] Accurate thumbnails

2011-09-14 Thread Bjoern Hoehrmann
* Bjoern Hoehrmann wrote: >Batik supports JavaScript, so if you have dynamically generated content >you may have to use that. My http://cutycapt.sf.net/ can turn SVG into >PNG and other formats aswell, and it supports JavaScript. IECapt should >do the same if you have IE9 installed, but it does not

Re: [svg-developers] No Keyboard Events

2011-09-14 Thread Jacob Beard
I think your best bet for handling keyboard events interoperably across SVG renderers is to register the key* event listener (keyup, keydown, keypress) on the document root element. Some renderers do things differently - for example Batik can receive keypress events on individual elements based on

[svg-developers] Re: SVG scripting support for IDE

2011-09-14 Thread Francis Hemsher
I've created a listing and examples of SVG methods, properties, styles, and attributes for scripting. (the file below is best viewed in IE9) See; http://www.svgDiscovery.com/SVGJavascriptREF/ --- In svg-developers@yahoogroups.com, Zdeněk Kedaj wrote: > > Hello, > I have spent quite some learnin

Re: [svg-developers] Accurate thumbnails

2011-09-14 Thread Bjoern Hoehrmann
* matthias_moran wrote: >I've looked at ImageMagik which can use librsvg to do it but how accurate is >it ? Wikimedia uses rsvg to make thumbnails on Wikipedia and Commons, so you can look there to get an idea. >Is it necessary to somehow build a javascript engine into the server to >run all th

[svg-developers] No Keyboard Events

2011-09-14 Thread dark3251
Am I right to assume there are no keyboard events associated with SVG at this time? I see nothing in the specifications although the confusing thing to me is that I see events describing "focus" as if there were keyboard events (e.g. onfocusin/out). Am I just misunderstanding the meaning of focu

[svg-developers] SVG scripting support for IDE

2011-09-14 Thread Zdeněk Kedaj
Hello, I have spent quite some learning the SVG and some scripting around, but It could have been much faster if I had the IDE support for available methods and properties. For my IntelliJ IDEA it could be simply achieved by adding a .js file containing just the signatures (prototypes) of methods t

[svg-developers] Re: How to handle animation event without SMIL

2011-09-14 Thread Narendra
David, Thank you very much for the suggestion. But I am doing in bit different way, lets suppose the code as: First time, it works properly for image/1.jpg but when I update the image to image/2.jpg (on "Next" button click event), the image/2.jpg is not using the previous animation. As in

SV: [svg-developers] Re: Animation

2011-09-14 Thread dark3251
You can get the current position of an animated or otherwise transformed element by using the method "getCTM()." This function will return the "current transformation matrix" of the element. This will require a bit of reading to understand, but the returned SVGMatrix object contains the translat

[svg-developers] Accurate thumbnails

2011-09-14 Thread matthias_moran
Is it possible for a server process to generate accurate bitmap thumbnails of large svg documents ? I've looked at ImageMagik which can use librsvg to do it but how accurate is it ? I don't have a lot of control over the svg document content because it can come from any number of different sou

[svg-developers] Re: Access parent DOM through script in embedded SVG

2011-09-14 Thread dark3251
Thanks. As for the vs , the WC3 still states HTML5 is preferred to . Is there a specific reason you would use an over an ? --- In svg-developers@yahoogroups.com, "David Dailey" wrote: > > Take a look at > http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#SVG_in_HTML . > This was wr