Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

svg-developers · SVG Developers

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 8779
  • Category: Data Formats
  • Founded: Aug 16, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 64850 - 64879 of 66156   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#64850 From: "Charles McCathieNevile" <chaals@...>
Date: Tue Jul 5, 2011 8:11 am
Subject: Re: Re: Number of cell phones that are SVG capable.
charlesmccn
Send Email Send Email
 
On Mon, 13 Jun 2011 06:31:54 +0200, mikh2161 <mikh2161@...> wrote:

> I am curious for an art installation which digital photo frames support
> the format.

Sony shipped the VGF-CP1 with Opera on it. Should have SVG support, not
sure how easy it is to find one.

cheers

> --- In svg-developers@yahoogroups.com, Mark T <paradisaeidae@...> wrote:
>>
>> On a recent visit to CeBit, Sydney (today) I found 'Motion Computing'
>> tablets are being shipped with IE9.
>> http://www.motioncomputing.com/
>>
>> Android switches on svg:
>> www.talkandroid.com/29048-honeycomb-browser-to-support-svg/
>>
http://googlesystem.blogspot.com/2011/02/android-honeycombs-browser-supports-svg\
.html
>>
>> Honeycomb being the tablet.
>> Less of an issue when battery goes low.
>> Many Android fones may require Firefox/OperaM to be installed for svg
>> experience.
>>
>> Time for some redirection pages.
>>
>> MarkT
>>
>
>


--
Charles McCathieNevile  Opera Software, Standards Group
      je parle français -- hablo español -- jeg lærer norsk
http://my.opera.com/chaals       Try Opera: http://www.opera.com

#64851 From: Raks A <rakssvg@...>
Date: Wed Jul 6, 2011 5:16 pm
Subject: SVG SMIL on HoneyComb
rakssvg
Send Email Send Email
 
Hi,

Has anyone experienced SVG on HoneyComb tablets especially SMIL animation
Even though I read in news articles that SVG has been put on on Android 3.0,
not sure about SMIL and its performance

Why there is no word from Google about its plan of supporting SVG in coming
versions of Android
There is a bug open in Android but the comments from Google are very
ambiguous


- Raks


[Non-text portions of this message have been removed]

#64852 From: ブランドコピー腕時計|財布|バッグ激安販売店 <take@...>
Date: Wed Jul 6, 2011 7:24 pm
Subject: svg-developers様 ブランド専門店|腕時計,バッグ,財布 最大80%OFF!送料無料 【832041】
takesato
Send Email Send Email
 
ブランドバッihグ,ブランド財jrdmntpf布,ブランド腕cvyggf時計\
販売店 100%品質xcxwx保証!
注rgrkpbhb文特恵中-新作入荷!-価ms格比較.送料無料!


◆超激安!!史上最も激安い商店!! 
◆主要取扱商品:ブランドバッelfhvxwaグ、財布、腕hd時計、服\
、ベルhtyxxleト、ネクタイ、ライタ!
◆全国送料ot一律無料
◆yahooオークション、楽天オークション、売店、卸売りと小\
売りの第一選択のブランドの店。
■信用第一、良い品質、低価dnyqvxzb格は 私達の勝ち残りの\
切り札です。
◆当社の商品は絶対の自信が御座います。おすすめ人気ブ\
ンド腕時計, 最高等級時計大量入荷!
◆S品質 、N品質シリアル付きも有り 付属品完備!
新しくて古い取引先の支持に感謝するため、2011年7月1日か\
2011年7月30日まで
商品特価:
★注文金nukwr額10000以上: 代whyibhxc金 10% OFF!
★注文金gbqocrby額30000以上: 代wvh金 15% OFF!
★注文金pxwqkd額60000以上: 代mlaowel金 20% OFF!
★注文金bnt額100000以上:代biqnp金 25% OFF!
★注文金bzrno額200000以上:代cjcd金 30% OFF!
★注文金eknfb額300000以上:代teq金 35% OFF!
割引後の商品品質が不変であることを保証します、新古取\
先を歓迎して買いに来ます。
◆当社広告・宣伝URL: www.sashimijp.info
eab
メール配信解除
━━━━━━━━━━━━━━━━━━━━━━━━━━\
━━━━━━━━
本メールの送信アドレスは送信専用となっております。返\
メールでのお問い合わせは承りかねますので、あらかじめ\
了承願います。上の指定するメールボックスを使って下さ\
い:連絡.注文.問合.

[Non-text portions of this message have been removed]

#64853 From: Jon Frost <jonfrost@...>
Date: Wed Jul 6, 2011 7:43 pm
Subject: Re: SVG SMIL on HoneyComb
jonfrostsvg
Send Email Send Email
 
I do not have a newer tablet to test with yet but the latest Android sdk
(version 3.1) is available here -
http://developer.android.com/sdk/index.html

And you can review the SVG capabilities in the SDK's built-in emulator -
http://developer.android.com/guide/developing/tools/emulator.html

Though this does not help with assessing SMIL speed performance on an actual
tablet, should give you a good review of the capabilities.


[Non-text portions of this message have been removed]

#64854 From: "jeremie.tauvel" <jeremie.tauvel@...>
Date: Tue Jul 12, 2011 8:26 am
Subject: Batik extensions : svg + swing components
jeremie.tauvel
Send Email Send Email
 
Hello,

I would like to use batik extensions to add swing components into batik.
I wrote my Batik DOM extension, my Batik bridge extension and implemented the
primitivePaint method in a new class who extend AbstractGraphicsNode.
At this step I can see my swing components (JButton, JTextField) to the screen
with the SVG objects

But now I would like to interact with my swing components and at this time, I
don't know how I can do it
If I click on the component, nothing append, there is no events and I can do
nothing with it.

So, If anyone succeeded in making  swing components interactive when showed in
JSvgCanvas (with the bridge extension method), I would be very grateful for the
help who you can bring to me.

Best regards and thanks in advance.
Jeremie TAUVEL

#64855 From: "gmcaulee" <gmcauley@...>
Date: Wed Jul 13, 2011 3:51 am
Subject: Calling SVG From HTML
gmcaulee
Send Email Send Email
 
I would like to call a script function in a SVG document that is embedded in an
HTML document.  The following HTML and SVG files work in Firefox, Opera, IE9 but
not Chrome (have not tested in Safari).

My questions are:

1) How can I get this to work in Chrome?
2) Is there a general way to do this that will work for all browsers?
3) If the answer to 2) is no, what are my options?

TIA

*** The HTML: ***

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<script type="text/javascript">
<!--

var svgdoc = null;
var svgwin = null;

function init() {

      var embed = document.getElementById('embed');
      svgdoc = embed.getSVGDocument();
      if (svgdoc && svgdoc.defaultView)
         svgwin = svgdoc.defaultView;
      sayHello();

}

function sayHello() {
	 svgwin.sayHello();
}

//-->
</script>
</head>
<body onload="init()">
<embed id="embed" src="test.svg" width="300" height="200" type="image/svg+xml"
/>
</body>
</html>

*** The SVG: ***

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="200px" height="200">
	 <script type="text/javascript"><![CDATA[

     function sayHello() {
		 alert("Hello from test.svg!!!");
     }

   // ]]></script>
	 <defs>
		 <rect id="bg_rect" x="0" y="0" width="200" height="200" fill="#ccffff"/>
		 <path id="path1" d="M -10 5 L 40 5 L 40 50 L -10 50 L -10 5"
style="fill:#000000;"/>
	 </defs>
	 <use x="0" y="0" xlink:href="#bg_rect"/>
	 <g>
		 <rect id="rect1" x="140" y="48" width="231" height="213"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(0,143,0)"/>
		 <polygon id="shape1" points="457,124 526,96 457,68 420,17 383,68 314,96
383,124 420,175 457,124" fill="rgb(158,0,76)"
transform="matrix(0.352113,0,0,0.352113,-10.564,15.1411)"/>
		 <polygon points="524,253 598,295 590,389 503,463 424,337 428,233"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(228,14,242)"/>
		 <polygon id="shape3" points="392,380 346,450 243,467 160,419 160,341 243,293
346,310" transform="matrix(0.352113,0,0,0.352113,-34.1549,0)"
fill="rgb(251,0,55)"/>
	 </g>
	 <animate attributeName="fill-opacity" attributeType="CSS" from="1.0" to="0.0"
begin="0" dur="5s" fill="freeze" repeatCount="indefinite" xlink:href="#shape1"/>
	 <animateMotion repeatCount="indefinite" dur="5s" rotate="0" fill="freeze"
xlink:href="#shape3">
		 <mpath xlink:href="#path1"/>
	 </animateMotion>
</svg>

#64856 From: Oliver Boermans <boermans@...>
Date: Wed Jul 13, 2011 10:52 am
Subject: Re: Calling SVG From HTML
oliverboermans
Send Email Send Email
 
On 13 July 2011 13:21, gmcaulee <gmcauley@...> wrote:
>    <script type="text/javascript"><![CDATA[
>
>  function sayHello() {
>        alert("Hello from test.svg!!!");
>  }
>
> // ]]></script>

Its similar to working between an iframe and the containing document.
You can expose the function in the parent document. You can do this directly.

// the HTML - Create an object before the svg loads
var svg = {};

// test.svg - assign your function to that object
parent.svg.sayHello = function() {
        alert("Hello from test.svg!!!");
}

// Once the SVG is loaded you can call it from the HTML
svg.sayHello();

Actually looking back at my code I notice I define the object in the
parent document taking care to not overwrite it if it already exists:
var svg = svg?svg: {};

I dont remember exactly how that might be necessary. Maybe the timing
of the loading of the svg was unreliable.

HTH

Ollie
--
@ollicle

#64857 From: "jon_ferraiolo" <jferrai@...>
Date: Wed Jul 13, 2011 1:37 pm
Subject: Re: Calling SVG From HTML
jon_ferraiolo
Send Email Send Email
 
I have found that there are lots of timing issues with different browsers. The
onload handler on the HTML side gets invoked when the HTML file has "fully
loaded", but that does not necessarily mean its "images" included SVG images
referenced by OBJECT, EMBED or IFRAME have been loaded yet. Because of this, the
HTML onload handler might be getting invoked before the SVG file has been
loaded.

Instead, what you should try:

(1) Use OBJECT instead of EMBED because OBJECT is the officially sanctioned
element and is supported everywhere that SVG is supported natively, and because
it is officially supported, you are more likely to find accurate specifications
(2) Put an onload handler on the OBJECT tag for the SVG. This handler will get
invoked when the SVG has successfully loaded.
(3) Call getSVGDocument() in the onload handler for the OBJECT tag

Jon Ferraiolo

--- In svg-developers@yahoogroups.com, Oliver Boermans <boermans@...> wrote:
>
> On 13 July 2011 13:21, gmcaulee <gmcauley@...> wrote:
> >    <script type="text/javascript"><![CDATA[
> >
> >  function sayHello() {
> >        alert("Hello from test.svg!!!");
> >  }
> >
> > // ]]></script>
>
> It's similar to working between an iframe and the containing document.
> You can expose the function in the parent document. You can do this directly.
>
> // the HTML - Create an object before the svg loads
> var svg = {};
>
> // test.svg - assign your function to that object
> parent.svg.sayHello = function() {
>        alert("Hello from test.svg!!!");
> }
>
> // Once the SVG is loaded you can call it from the HTML
> svg.sayHello();
>
> Actually looking back at my code I notice I define the object in the
> parent document taking care to not overwrite it if it already exists:
> var svg = svg?svg: {};
>
> I don't remember exactly how that might be necessary. Maybe the timing
> of the loading of the svg was unreliable.
>
> HTH
>
> Ollie
> --
> @ollicle
>

#64858 From: Mark T <paradisaeidae@...>
Date: Thu Jul 14, 2011 12:55 am
Subject: Re: Calling SVG From HTML
markstestacc...
Send Email Send Email
 
If you have time & the project context allows, maybe try inverting the HTML
<-> SVG.
SVG being the top document, then place the html as a foreignObject.
There are different 'issues' admittedly.
Though in this scenario the browsers are starting with well formed xml.
The browser renderer then does not need to redraw the whole page.
I am exploring this path myself.
The onload triggers appear to have different behaviors.
I am hoping they may turn out more predictable.
When xml-application is loaded by a browser, there are processing
instructions which it sees first.
One of these can be a style sheet.
This is good, as then there is no shaky-shaky as the browser redraws on each
bit of incomming stylesheet.

MarkT

>  I would like to call a script function in a SVG document that is embedded
> in an HTML document. The following HTML and SVG files work in Firefox,
> Opera, IE9 but not Chrome (have not tested in Safari).
>


[Non-text portions of this message have been removed]

#64859 From: "random_transform" <kingfysher@...>
Date: Thu Jul 14, 2011 2:19 am
Subject: Re: Calling SVG From HTML
random_trans...
Send Email Send Email
 
I fiddled with this, without joy.
  To eliminate possible initialization timing issues, I moved init() to the
onclick event of a button that I added. (IRL I'd probably instead have used
JQuery's .ready function to make sure everything was initialized before calling
my own script...haven't heard of any issues combing Jquery with SVG's DOM).
   I get "Uncaught TypeError: [object DomWindow] has no method 'sayHello', in
Chrome's Developer Tools Scripts Panel.

I get the same error if I embed test.svg with an <object> tag or with <embed>.

FWIW, it works fine in Safari 5.0.5, so it's not a general Webkit issue.

I suppose this is a test case of something more functional, and you don't really
need to use a .svg file to store a javascript library that's actually called in
response to events that originate from non-svg HTML elements?



--- In svg-developers@yahoogroups.com, "gmcaulee" <gmcauley@...> wrote:
>
>
> I would like to call a script function in a SVG document that is embedded in
an HTML document.  The following HTML and SVG files work in Firefox, Opera, IE9
but not Chrome (have not tested in Safari).
>
> My questions are:
>
> 1) How can I get this to work in Chrome?
> 2) Is there a general way to do this that will work for all browsers?
> 3) If the answer to 2) is no, what are my options?
>
> TIA
>
> *** The HTML: ***
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>Test</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
>
> <script type="text/javascript">
> <!--
>
> var svgdoc = null;
> var svgwin = null;
>
> function init() {
>
>      var embed = document.getElementById('embed');
>      svgdoc = embed.getSVGDocument();
>      if (svgdoc && svgdoc.defaultView)
>         svgwin = svgdoc.defaultView;
>      sayHello();
>
> }
>
> function sayHello() {
>  svgwin.sayHello();
> }
>
> //-->
> </script>
> </head>
> <body onload="init()">
> <embed id="embed" src="test.svg" width="300" height="200" type="image/svg+xml"
/>
> </body>
> </html>
>
> *** The SVG: ***
>
> <?xml version="1.0"?>
> <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="200px" height="200">
>  <script type="text/javascript"><![CDATA[
>
>     function sayHello() {
> 	 alert("Hello from test.svg!!!");
>     }
>
>   // ]]></script>
>  <defs>
> 	 <rect id="bg_rect" x="0" y="0" width="200" height="200" fill="#ccffff"/>
> 	 <path id="path1" d="M -10 5 L 40 5 L 40 50 L -10 50 L -10 5"
style="fill:#000000;"/>
>  </defs>
>  <use x="0" y="0" xlink:href="#bg_rect"/>
>  <g>
> 	 <rect id="rect1" x="140" y="48" width="231" height="213"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(0,143,0)"/>
> 	 <polygon id="shape1" points="457,124 526,96 457,68 420,17 383,68 314,96
383,124 420,175 457,124" fill="rgb(158,0,76)"
transform="matrix(0.352113,0,0,0.352113,-10.564,15.1411)"/>
> 	 <polygon points="524,253 598,295 590,389 503,463 424,337 428,233"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(228,14,242)"/>
> 	 <polygon id="shape3" points="392,380 346,450 243,467 160,419 160,341 243,293
346,310" transform="matrix(0.352113,0,0,0.352113,-34.1549,0)"
fill="rgb(251,0,55)"/>
>  </g>
>  <animate attributeName="fill-opacity" attributeType="CSS" from="1.0" to="0.0"
begin="0" dur="5s" fill="freeze" repeatCount="indefinite" xlink:href="#shape1"/>
>  <animateMotion repeatCount="indefinite" dur="5s" rotate="0" fill="freeze"
xlink:href="#shape3">
> 	 <mpath xlink:href="#path1"/>
>  </animateMotion>
> </svg>
>

#64860 From: "random_transform" <kingfysher@...>
Date: Thu Jul 14, 2011 10:48 pm
Subject: Re: Calling SVG From HTML
random_trans...
Send Email Send Email
 
Ok, I fiddled some more and got it to work if I put init() in the handler for a
button, so it got called after everything was fully rendered, rather than in
<body> .  Still got an error with init() called from JQuery  $(document).ready,
so that's probably a dead end.

So I guess it is indeed a timing issue with Chrome. Just for fun I tried to call
init() (as a function defined in the html) from onload in the svg file...it
doesn't find an init function.


--- In svg-developers@yahoogroups.com, "random_transform" <kingfysher@...>
wrote:
>
>  I fiddled with this, without joy.
>  To eliminate possible initialization timing issues, I moved init() to the
onclick event of a button that I added. (IRL I'd probably instead have used
JQuery's .ready function to make sure everything was initialized before calling
my own script...haven't heard of any issues combing Jquery with SVG's DOM).
>   I get "Uncaught TypeError: [object DomWindow] has no method 'sayHello', in
Chrome's Developer Tools Scripts Panel.
>
> I get the same error if I embed test.svg with an <object> tag or with <embed>.
>
> FWIW, it works fine in Safari 5.0.5, so it's not a general Webkit issue.
>
> I suppose this is a test case of something more functional, and you don't
really need to use a .svg file to store a javascript library that's actually
called in response to events that originate from non-svg HTML elements?
>
>
>
> --- In svg-developers@yahoogroups.com, "gmcaulee" <gmcauley@> wrote:
> >
> >
> > I would like to call a script function in a SVG document that is embedded in
an HTML document.  The following HTML and SVG files work in Firefox, Opera, IE9
but not Chrome (have not tested in Safari).
> >
> > My questions are:
> >
> > 1) How can I get this to work in Chrome?
> > 2) Is there a general way to do this that will work for all browsers?
> > 3) If the answer to 2) is no, what are my options?
> >
> > TIA
> >
> > *** The HTML: ***
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> > "http://www.w3.org/TR/html4/loose.dtd">
> > <html>
> > <head>
> > <title>Test</title>
> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
> >
> > <script type="text/javascript">
> > <!--
> >
> > var svgdoc = null;
> > var svgwin = null;
> >
> > function init() {
> >
> >      var embed = document.getElementById('embed');
> >      svgdoc = embed.getSVGDocument();
> >      if (svgdoc && svgdoc.defaultView)
> >         svgwin = svgdoc.defaultView;
> >      sayHello();
> >
> > }
> >
> > function sayHello() {
> >  svgwin.sayHello();
> > }
> >
> > //-->
> > </script>
> > </head>
> > <body onload="init()">
> > <embed id="embed" src="test.svg" width="300" height="200"
type="image/svg+xml" />
> > </body>
> > </html>
> >
> > *** The SVG: ***
> >
> > <?xml version="1.0"?>
> > <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="200px" height="200">
> >  <script type="text/javascript"><![CDATA[
> >
> >     function sayHello() {
> > 	 alert("Hello from test.svg!!!");
> >     }
> >
> >   // ]]></script>
> >  <defs>
> > 	 <rect id="bg_rect" x="0" y="0" width="200" height="200" fill="#ccffff"/>
> > 	 <path id="path1" d="M -10 5 L 40 5 L 40 50 L -10 50 L -10 5"
style="fill:#000000;"/>
> >  </defs>
> >  <use x="0" y="0" xlink:href="#bg_rect"/>
> >  <g>
> > 	 <rect id="rect1" x="140" y="48" width="231" height="213"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(0,143,0)"/>
> > 	 <polygon id="shape1" points="457,124 526,96 457,68 420,17 383,68 314,96
383,124 420,175 457,124" fill="rgb(158,0,76)"
transform="matrix(0.352113,0,0,0.352113,-10.564,15.1411)"/>
> > 	 <polygon points="524,253 598,295 590,389 503,463 424,337 428,233"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(228,14,242)"/>
> > 	 <polygon id="shape3" points="392,380 346,450 243,467 160,419 160,341
243,293 346,310" transform="matrix(0.352113,0,0,0.352113,-34.1549,0)"
fill="rgb(251,0,55)"/>
> >  </g>
> >  <animate attributeName="fill-opacity" attributeType="CSS" from="1.0"
to="0.0" begin="0" dur="5s" fill="freeze" repeatCount="indefinite"
xlink:href="#shape1"/>
> >  <animateMotion repeatCount="indefinite" dur="5s" rotate="0" fill="freeze"
xlink:href="#shape3">
> > 	 <mpath xlink:href="#path1"/>
> >  </animateMotion>
> > </svg>
> >
>

#64861 From: Cameron Laird <claird@...>
Date: Fri Jul 15, 2011 1:12 pm
Subject: Re: Re: Calling SVG From HTML
Cameron_Laird
Send Email Send Email
 
On Thu, Jul 14, 2011 at 10:48:50PM -0000, random_transform wrote:
			 .
			 .
			 .
> Ok, I fiddled some more and got it to work if I put init() in the handler for
a button, so it got called after everything was fully rendered, rather than in
<body> .  Still got an error with init() called from JQuery  $(document).ready,
so that's probably a dead end.
>
> So I guess it is indeed a timing issue with Chrome. Just for fun I tried to
call init() (as a function defined in the html) from onload in the svg file...it
doesn't find an init function.
			 .
			 .
			 .
This thread has confused me.  As I haven't kept up with the
exact source in play, I can't be certain; I suspect, though,
that your JavaScript coding simply is mistaken.  The namespace
of an embedded SVG instance is distinct from that of the
main document.  I've been most successful with constructions
that look more like:

     <object id = 'map' type = 'image/svg+xml' data = 'special_map.svg' ...

     map = document.getElementById('map')
     svg_document = map.contentDocument;
     location = svg_document.getElementById(locator)

You have a piece of functionality you want to execute; you
apparently name it "init()".  Should it properly belong in
the SVG object, or the parent document?  Either can be
coded effectively, but they're not identical.  I *think*
you want the init() definition to appear as part of the
SVG definition; in that case, you'll need to vector through
.contentDocument to access what "belongs" to the SVG.

#64862 From: "gmcaulee" <gmcauley@...>
Date: Sat Jul 16, 2011 1:39 am
Subject: Re: Calling SVG From HTML
gmcaulee
Send Email Send Email
 
Thank you all for your replies!  Have not had a chance to digest all this and
try out your suggestions - but hope too get back to it soon ...

--- In svg-developers@yahoogroups.com, "gmcaulee" <gmcauley@...> wrote:
>
>
> I would like to call a script function in a SVG document that is embedded in
an HTML document.  The following HTML and SVG files work in Firefox, Opera, IE9
but not Chrome (have not tested in Safari).
>
> My questions are:
>
> 1) How can I get this to work in Chrome?
> 2) Is there a general way to do this that will work for all browsers?
> 3) If the answer to 2) is no, what are my options?
>
> TIA
>
> *** The HTML: ***
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>Test</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
>
> <script type="text/javascript">
> <!--
>
> var svgdoc = null;
> var svgwin = null;
>
> function init() {
>
>      var embed = document.getElementById('embed');
>      svgdoc = embed.getSVGDocument();
>      if (svgdoc && svgdoc.defaultView)
>         svgwin = svgdoc.defaultView;
>      sayHello();
>
> }
>
> function sayHello() {
>  svgwin.sayHello();
> }
>
> //-->
> </script>
> </head>
> <body onload="init()">
> <embed id="embed" src="test.svg" width="300" height="200" type="image/svg+xml"
/>
> </body>
> </html>
>
> *** The SVG: ***
>
> <?xml version="1.0"?>
> <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="200px" height="200">
>  <script type="text/javascript"><![CDATA[
>
>     function sayHello() {
> 	 alert("Hello from test.svg!!!");
>     }
>
>   // ]]></script>
>  <defs>
> 	 <rect id="bg_rect" x="0" y="0" width="200" height="200" fill="#ccffff"/>
> 	 <path id="path1" d="M -10 5 L 40 5 L 40 50 L -10 50 L -10 5"
style="fill:#000000;"/>
>  </defs>
>  <use x="0" y="0" xlink:href="#bg_rect"/>
>  <g>
> 	 <rect id="rect1" x="140" y="48" width="231" height="213"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(0,143,0)"/>
> 	 <polygon id="shape1" points="457,124 526,96 457,68 420,17 383,68 314,96
383,124 420,175 457,124" fill="rgb(158,0,76)"
transform="matrix(0.352113,0,0,0.352113,-10.564,15.1411)"/>
> 	 <polygon points="524,253 598,295 590,389 503,463 424,337 428,233"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(228,14,242)"/>
> 	 <polygon id="shape3" points="392,380 346,450 243,467 160,419 160,341 243,293
346,310" transform="matrix(0.352113,0,0,0.352113,-34.1549,0)"
fill="rgb(251,0,55)"/>
>  </g>
>  <animate attributeName="fill-opacity" attributeType="CSS" from="1.0" to="0.0"
begin="0" dur="5s" fill="freeze" repeatCount="indefinite" xlink:href="#shape1"/>
>  <animateMotion repeatCount="indefinite" dur="5s" rotate="0" fill="freeze"
xlink:href="#shape3">
> 	 <mpath xlink:href="#path1"/>
>  </animateMotion>
> </svg>
>

#64863 From: "philsvg" <philsvg@...>
Date: Sat Jul 16, 2011 5:48 am
Subject: Re: Calling SVG From HTML
philsvg
Send Email Send Email
 
As i can guess from others replies, you have to synchronize yourself html and
svg.
1) add a global var in your html,
2) set that global var when you load your svg, in the init() function or, if
your svg document is too long or your server too slow, add a script section at
the end of your svg,
3) in your html, function sayHello, test if the global var is set. if not, wait
few milliseconds and loop until the svg is loaded.

Philippe
http://www.visualkit.com
competition 3dviastudio vs webgl : 1000 euros to win
http://labo.visualkit.com/competitions/node/142


--- In svg-developers@yahoogroups.com, "gmcaulee" <gmcauley@...> wrote:
>
>
> I would like to call a script function in a SVG document that is embedded in
an HTML document.  The following HTML and SVG files work in Firefox, Opera, IE9
but not Chrome (have not tested in Safari).
>
> My questions are:
>
> 1) How can I get this to work in Chrome?
> 2) Is there a general way to do this that will work for all browsers?
> 3) If the answer to 2) is no, what are my options?
>
> TIA
>
> *** The HTML: ***
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>Test</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
>
> <script type="text/javascript">
> <!--
>
> var svgdoc = null;
> var svgwin = null;
>
> function init() {
>
>      var embed = document.getElementById('embed');
>      svgdoc = embed.getSVGDocument();
>      if (svgdoc && svgdoc.defaultView)
>         svgwin = svgdoc.defaultView;
>      sayHello();
>
> }
>
> function sayHello() {
>  svgwin.sayHello();
> }
>
> //-->
> </script>
> </head>
> <body onload="init()">
> <embed id="embed" src="test.svg" width="300" height="200" type="image/svg+xml"
/>
> </body>
> </html>
>
> *** The SVG: ***
>
> <?xml version="1.0"?>
> <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="200px" height="200">
>  <script type="text/javascript"><![CDATA[
>
>     function sayHello() {
> 	 alert("Hello from test.svg!!!");
>     }
>
>   // ]]></script>
>  <defs>
> 	 <rect id="bg_rect" x="0" y="0" width="200" height="200" fill="#ccffff"/>
> 	 <path id="path1" d="M -10 5 L 40 5 L 40 50 L -10 50 L -10 5"
style="fill:#000000;"/>
>  </defs>
>  <use x="0" y="0" xlink:href="#bg_rect"/>
>  <g>
> 	 <rect id="rect1" x="140" y="48" width="231" height="213"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(0,143,0)"/>
> 	 <polygon id="shape1" points="457,124 526,96 457,68 420,17 383,68 314,96
383,124 420,175 457,124" fill="rgb(158,0,76)"
transform="matrix(0.352113,0,0,0.352113,-10.564,15.1411)"/>
> 	 <polygon points="524,253 598,295 590,389 503,463 424,337 428,233"
transform="matrix(0.352113,0,0,0.352113,-34.1549,0)" fill="rgb(228,14,242)"/>
> 	 <polygon id="shape3" points="392,380 346,450 243,467 160,419 160,341 243,293
346,310" transform="matrix(0.352113,0,0,0.352113,-34.1549,0)"
fill="rgb(251,0,55)"/>
>  </g>
>  <animate attributeName="fill-opacity" attributeType="CSS" from="1.0" to="0.0"
begin="0" dur="5s" fill="freeze" repeatCount="indefinite" xlink:href="#shape1"/>
>  <animateMotion repeatCount="indefinite" dur="5s" rotate="0" fill="freeze"
xlink:href="#shape3">
> 	 <mpath xlink:href="#path1"/>
>  </animateMotion>
> </svg>
>

#64864 From: "David Dailey" <ddailey@...>
Date: Sat Jul 16, 2011 7:03 pm
Subject: The Noun Project
ddailey@...
Send Email Send Email
 
Jon Frost recently brought my attention to the "Noun Project." It is a
public domain set of SVG icons depicting a bit of most anything. Many date
from the 1970's; some were created by the National Park Service (explaining
the public domain status of the work since following the revolution the US
founders didn't think the crown should own copyright on the law or other
works of government). It fits in nicely with some other things I've seen on
internationalization and universal languages, and the images are generally
quite nice: http://thenounproject.com/ . It looks like much of the stuff
came to us from Adobe Illustrator, but the ones I looked at are fairly
"clean" (in terms of the underlying SVG code).



The mission is quite simple and noble: http://thenounproject.com/mission/



Cheers

David



[Non-text portions of this message have been removed]

#64865 From: "random_transform" <kingfysher@...>
Date: Fri Jul 15, 2011 4:54 pm
Subject: Re: Calling SVG From HTML
random_trans...
Send Email Send Email
 
Sorry for the confusion.  I assumed the original poster's question boiled
down to "Why can I call functions in the embedded svg document from the handler
for the containing html document's body.onload event in everything but Chrome,
but not in Chrome?"
    BTW, I may be mistaken, but the statement "The namespace of an embedded SVG
instance is distinct from that of the main document." suggests to me that you
don't expect to be able to make function calls from javascript functions
declared in the main html document to javascript functions declared in the
embedded svg document.

--- In svg-developers@yahoogroups.com, Cameron Laird <claird@...> wrote:
>
> On Thu, Jul 14, 2011 at 10:48:50PM -0000, random_transform wrote:
> 		 .
> 		 .
> 		 .
> > Ok, I fiddled some more and got it to work if I put init() in the handler
for a button, so it got called after everything was fully rendered, rather than
in <body> .  Still got an error with init() called from JQuery 
$(document).ready, so that's probably a dead end.
> >
> > So I guess it is indeed a timing issue with Chrome. Just for fun I tried to
call init() (as a function defined in the html) from onload in the svg file...it
doesn't find an init function.
> 		 .
> 		 .
> 		 .
> This thread has confused me.  As I haven't kept up with the
> exact source in play, I can't be certain; I suspect, though,
> that your JavaScript coding simply is mistaken.  The namespace
> of an embedded SVG instance is distinct from that of the
> main document.  I've been most successful with constructions
> that look more like:
>
>     <object id = 'map' type = 'image/svg+xml' data = 'special_map.svg' ...
>
>     map = document.getElementById('map')
>     svg_document = map.contentDocument;
>     location = svg_document.getElementById(locator)
>
> You have a piece of functionality you want to execute; you
> apparently name it "init()".  Should it properly belong in
> the SVG object, or the parent document?  Either can be
> coded effectively, but they're not identical.  I *think*
> you want the init() definition to appear as part of the
> SVG definition; in that case, you'll need to vector through
> .contentDocument to access what "belongs" to the SVG.
>

#64866 From: "cremnosedum" <richard@...>
Date: Tue Jul 19, 2011 3:38 pm
Subject: Firefox 5
cremnosedum
Send Email Send Email
 
Hi,

I thought Firefox 5 was supposed to have hugely improved SVG support (or am I
imagining things or have I slipped into a parallel universe where things are
only slightly different?).  However I've just finished testing it against my web
comic and, if anything, it seems slightly worse (e.g. an SMIL animation which
ran but also produced a warning now just does the latter).  Have they added
things like forienObject which I don't use (because I want my comic to work in
all major browsers)?

Richard Pearman       http://www.pixelpalaces.com/
The next stage in the evolution of web comics:
http://www.onlinecomics.net/pages/details/listing.php?comicID=4415
Read my Helium articles: http://www.helium.com/users/212199
South Alberta Cactus and succulent society:
http://www.facebook.com/group.php?gid=20360241008
Make money from discussing things: http://www.myLot.com?ref=Graptopetalum

#64867 From: "Robert Longson" <longsonr@...>
Date: Tue Jul 19, 2011 3:59 pm
Subject: Re: Firefox 5
longsonr
Send Email Send Email
 
Compared to Firefox 4, firefox 5 has these SVG enhancements and a few of
bugfixes.

Adds support for animation of the class attribute.
Adds support for animation between absolute and relative path segments of the
same type

Here's the complete list:
https://bugzilla.mozilla.org/buglist.cgi?list_id=813641&field0-0-0=target_milest\
one&resolution=FIXED&query_format=advanced&type0-0-0=equals&value0-0-0=mozilla5&\
component=SVG&product=Core

foreignObject has been supported in Firefox since version 3.0

If you've got failing testcases then do let us know...

Best regards

Robert.

#64868 From: "cremnosedum" <richard@...>
Date: Tue Jul 19, 2011 4:46 pm
Subject: Re: Firefox 5
cremnosedum
Send Email Send Email
 
Hi,

Thanks for your speedy reply.  I mentioned foreinObject because it's a feature I
don't use so I wouldn't notice if it was added (and I obviously hadn't) or
improved.

The problems I've found with Firefox 5 (although the last version was pretty
similar) are:
   No support of filters that require the background graphic (yes I do have an
enableBackground="new" attribute in my root element).  Objects with filters that
require this just don't appear (but can receive events).
   No way to zoom or pan (or is there one I can't find?).
   Some issues with SMIL that work in other browsers (sorry but I haven't figured
out the pattern of the ones that don't work).
   image elements (particularly ones referencing SVG files) aren't always placed
correctly.
   Some issues with fonts being wrong, the wrong size or text missing (seems to
be fancyer fonts that are the problem).

If I can find the time I may give a more detailed account of the issues.

Richard Pearman       http://www.pixelpalaces.com/
The next stage in the evolution of web comics:
http://www.onlinecomics.net/pages/details/listing.php?comicID=4415
Read my Helium articles: http://www.helium.com/users/212199
South Alberta Cactus and succulent society:
http://www.facebook.com/group.php?gid=20360241008
Make money from discussing things: http://www.myLot.com?ref=Graptopetalum

--- In svg-developers@yahoogroups.com, "Robert Longson" <longsonr@...> wrote:
>
>
> Compared to Firefox 4, firefox 5 has these SVG enhancements and a few of
bugfixes.
>
> Adds support for animation of the class attribute.
> Adds support for animation between absolute and relative path segments of the
same type
>
> Here's the complete list:
https://bugzilla.mozilla.org/buglist.cgi?list_id=813641&field0-0-0=target_milest\
one&resolution=FIXED&query_format=advanced&type0-0-0=equals&value0-0-0=mozilla5&\
component=SVG&product=Core
>
> foreignObject has been supported in Firefox since version 3.0
>
> If you've got failing testcases then do let us know...
>
> Best regards
>
> Robert.
>

#64869 From: "Robert Longson" <longsonr@...>
Date: Tue Jul 19, 2011 6:07 pm
Subject: Re: Firefox 5
longsonr
Send Email Send Email
 
>   No support of filters that require the background graphic (yes I do have an
enableBackground="new" attribute in my root element).  Objects with filters that
require this just don't appear (but can receive events).

None of Firefox 5, 6 or 7 will have that unfortunately.

>   No way to zoom or pan (or is there one I can't find?).

Zoom and pan is implemented but there is no UI. You can roll your own e.g.
https://jwatt.org/svg/tests/zoom-and-pan-controls.svg

>   Some issues with SMIL that work in other browsers (sorry but I haven't
figured out the pattern of the ones that don't work).

There are SMIL fixes in Firefox 6 and Firefox 7. Filter and Gradient animation
currently still has some issues which are being worked on.

>   image elements (particularly ones referencing SVG files) aren't always
placed correctly.

I'd love to see as simple testcase for images. You know that javascript is
disabled in images don't you?

>   Some issues with fonts being wrong, the wrong size or text missing (seems to
be fancyer fonts that are the problem).

There is a text layout fix in Firefox 6 but there are still known issues even
now. We do insist that font-size has units if it's set using CSS which may be an
issue for you. Are these WOFF fonts or SVG fonts or TrueType fonts or something
else? Again an example would help.

Best regards

Robert.

#64870 From: "Pranav Lal" <pranav.lal@...>
Date: Wed Jul 20, 2011 1:35 am
Subject: RE: Title or desc tag in text tag?
slimprize
Send Email Send Email
 
Hi David,

I have a graph that has several <text> tags.
   <text x="255" y="32" font-family="Verdana" font-size="14"
font-weight="bold" fill="rgb(0,0,0)" text-anchor="middle"
style="baseline-shift:-25%">Sheet1 Chart 4

The accessible viewer for this graph needs a title element to be asociated
with every graphical element. Yes, I know the text element is not a
graphical element but I am exploring options as of now.
Which out of the two forms below will best preserve the visual appearance of
the text?
1.  <text x="255" y="32" font-family="Verdana" font-size="14"
font-weight="bold" fill="rgb(0,0,0)" text-anchor="middle"
style="baseline-shift:-25%">Sheet1 Chart 4 <title>Sheet1 Chart
4</title></text>
2. <text x="255" y="32" font-family="Verdana" font-size="14"
font-weight="bold" fill="rgb(0,0,0)" text-anchor="middle"
style="baseline-shift:-25%"><title>Sheet1 Chart 4</title></text>

I suspect the first form will but I would like other opinions.
Pranav

#64871 From: "couloir007" <couloir007@...>
Date: Wed Jul 20, 2011 6:03 am
Subject: Chrome Path Mouseover
couloir007
Send Email Send Email
 
Is chrome known to have issues with paths and mouseover events? In my svg with
roads, my mouseover events will only fire on small segments of the path. I can't
find much on this topic.

Thanks!

#64872 From: "David Dailey" <ddailey@...>
Date: Wed Jul 20, 2011 11:54 am
Subject: RE: Chrome Path Mouseover
ddailey@...
Send Email Send Email
 
This is not an issue I'm aware of. Perhaps others have noticed something,
but it sounds like a link to an example of the problem would be helpful.



Good luck

David



From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
On Behalf Of couloir007
Sent: Wednesday, July 20, 2011 2:04 AM
To: svg-developers@yahoogroups.com
Subject: [svg-developers] Chrome Path Mouseover





Is chrome known to have issues with paths and mouseover events? In my svg
with roads, my mouseover events will only fire on small segments of the
path. I can't find much on this topic.

Thanks!





[Non-text portions of this message have been removed]

#64873 From: "David Dailey" <ddailey@...>
Date: Wed Jul 20, 2011 1:11 pm
Subject: RE: Title or desc tag in text tag?
ddailey@...
Send Email Send Email
 
Hi Pranav, not sure if I'm the right person to ask, but if I understand the
question, the first one is the only one that will preserve visual appearance
of the text. The spec states [1] that

[ordinarily]  <http://www.w3.org/TR/SVG/struct.html#DescElement> 'desc' and
<http://www.w3.org/TR/SVG/struct.html#TitleElement> 'title' elements are not
rendered as part of the graphics



So the second block of code should not even allow the text to be displayed.
The spec also says [2] that

.         When the text content of a graphic (e.g., in a
<http://www.w3.org/TR/SVG/text.html#TextElement> 'text' element) explains
its function, no text equivalent is required. Use the
<http://www.w3.org/TR/SVG/struct.html#TitleElement> 'title' child element to
explain the function  <http://www.w3.org/TR/SVG/text.html#TextElement>
'text' elements whose meaning is not clear from their text content.

though I gather that your purpose requires it for other reasons. [Doesn't
that last sentence read a bit oddly? Perhaps the word "of" between
"function" and "text" might help??]



Another tip for consistency of appearance: I think that Firefox prefers that
units be specified on your font-size, so font-size="14pt" would be
preferable, if I'm right.



Cheers

David



[1] http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements

[2] http://www.w3.org/TR/SVG/access.html





From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
On Behalf Of Pranav Lal
Sent: Tuesday, July 19, 2011 9:35 PM
To: svg-developers@yahoogroups.com
Subject: RE: [svg-developers] Title or desc tag in text tag?





Hi David,

I have a graph that has several <text> tags.
<text x="255" y="32" font-family="Verdana" font-size="14"
font-weight="bold" fill="rgb(0,0,0)" text-anchor="middle"
style="baseline-shift:-25%">Sheet1 Chart 4

The accessible viewer for this graph needs a title element to be asociated
with every graphical element. Yes, I know the text element is not a
graphical element but I am exploring options as of now.
Which out of the two forms below will best preserve the visual appearance of
the text?
1. <text x="255" y="32" font-family="Verdana" font-size="14"
font-weight="bold" fill="rgb(0,0,0)" text-anchor="middle"
style="baseline-shift:-25%">Sheet1 Chart 4 <title>Sheet1 Chart
4</title></text>
2. <text x="255" y="32" font-family="Verdana" font-size="14"
font-weight="bold" fill="rgb(0,0,0)" text-anchor="middle"
style="baseline-shift:-25%"><title>Sheet1 Chart 4</title></text>

I suspect the first form will but I would like other opinions.
Pranav





[Non-text portions of this message have been removed]

#64874 From: "cremnosedum" <richard@...>
Date: Wed Jul 20, 2011 3:30 pm
Subject: Re: Firefox 5
cremnosedum
Send Email Send Email
 
Hi,

I'll be responding to your points below:

--- In svg-developers@yahoogroups.com, "Robert Longson" <longsonr@...> wrote:
>
> >   No support of filters that require the background graphic (yes I do have
an enableBackground="new" attribute in my root element).  Objects with filters
that require this just don't appear (but can receive events).
>
> None of Firefox 5, 6 or 7 will have that unfortunately.

This is unfortunate as I use this a great deal.

> >   No way to zoom or pan (or is there one I can't find?).
>
> Zoom and pan is implemented but there is no UI. You can roll your own e.g.
https://jwatt.org/svg/tests/zoom-and-pan-controls.svg

Roll your own zoom and pan is extra work and potential for complications.  I
have a sequence where I have changed the viewbox (if I remember corectly, I
certainly zoomed into a certain part of a picture) and it seems to interfere
with javascript events (although another place where I've done this doesn't -
don't know why).

> >   image elements (particularly ones referencing SVG files) aren't always
placed correctly.
>
> I'd love to see as simple testcase for images. You know that javascript is
disabled in images don't you?

I know that Javascript is disabled in images.  <rant>I don't understand why
images can't be treated like internal svg elements, obvioulsy the browser
already has the functionality required.  I can see how this could cause problems
but the developer should be aware of that and avoid different functions with the
same name etc. or perhaps exploit consistent rules about what overrides what. 
Javascript, SMIL, referencing other external files etc. could also be optionally
disabled in images.  I'd have thought this would be simple to impliment and
greatly expand the potential of SVG.</rant>  I also know this isn't unique to
Firefox.  This problem has nothing to do with Javascript (or at least not in the
external SVG files - they don't have any).  The problem is images appearing to
be scaled to slightly smaller than they should be with respect to the origin of
the parent svg.  Some images don't appear at all.  This doesn't seem entirely
consistent and I haven't figured out the pattern.

> >   Some issues with fonts being wrong, the wrong size or text missing (seems
to be fancyer fonts that are the problem).
>
> There is a text layout fix in Firefox 6 but there are still known issues even
now. We do insist that font-size has units if it's set using CSS which may be an
issue for you. Are these WOFF fonts or SVG fonts or TrueType fonts or something
else? Again an example would help.

I haven't checked how I've specified the units.  Early on I just worked on the
basis that px would be used as the default but I think I changed that, I may
have missed some.  I think the problem is mostly with SVG fonts (I only use them
or common fonts that are likely to be on the user's computer - the latter is the
majority and those seem to work coretly).

Unfortunately these comics are very complicated and I don't have much time to
work on test cases (I took me a while to figure out the display/javascript bug
that makes Opera 11 pretty much useless for viewing them).  Has anybody noticed
these problems in something simpler?

Richard Pearman       http://www.pixelpalaces.com/
The next stage in the evolution of web comics:
http://www.onlinecomics.net/pages/details/listing.php?comicID=4415
Read my Helium articles: http://www.helium.com/users/212199
South Alberta Cactus and succulent society:
http://www.facebook.com/group.php?gid=20360241008
Make money from discussing things: http://www.myLot.com?ref=Graptopetalum

#64875 From: Jonathan Chetwynd <j.chetwynd@...>
Date: Wed Jul 20, 2011 3:57 pm
Subject: foreignObject breaking W3C validator?
j.chetwynd...
Send Email Send Email
 
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13311

anyone shed any light on this?

cheers

Jonathan Chetwynd
http://www.peepo.com

http://www.peepo.com/index.svgz
   also reduced testcase [1]
   transient: http://www.peepo.com/dev.svg
mime-type: image/svg+xml both pass with direct input
   but fail by URI with 1 error: Line 8, Column 54:
SVG element foreignObject not allowed as child of SVG element svg in
this context. (Suppressing further errors from this subtree.)

   <?xml version="1.0" encoding="utf-8" standalone="no"?>
   <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xhtml="http://www.w3.org/1999/xhtml
" width="100" height="100" >
   <title>foreignObject</title>
   <foreignObject width="25" height="25" x="70" y="15" />
</svg>

#64876 From: Sean Montague <couloir007@...>
Date: Wed Jul 20, 2011 7:16 pm
Subject: Re: Chrome Path Mouseover
couloir007
Send Email Send Email
 
http://greenworld.org/chrome-test.svg

With chrome you need to move the mouse around until you hit the sweet
spot. FF works well, but is so sensitive its hard to keep mouseover. IE
with the old ASV 3 plugin is still the best, which I'm trying to
mothball. I can't test IE9.

Thanks!
Sean

On 07/20/2011 07:54 AM, David Dailey wrote:
>
> This is not an issue I'm aware of. Perhaps others have noticed something,
> but it sounds like a link to an example of the problem would be helpful.
>
> Good luck
>
> David
>
> From: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> [mailto:svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>]
> On Behalf Of couloir007
> Sent: Wednesday, July 20, 2011 2:04 AM
> To: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> Subject: [svg-developers] Chrome Path Mouseover
>
> Is chrome known to have issues with paths and mouseover events? In my svg
> with roads, my mouseover events will only fire on small segments of the
> path. I can't find much on this topic.
>
> Thanks!
>
> [Non-text portions of this message have been removed]
>
>


[Non-text portions of this message have been removed]

#64877 From: Jon Frost <jonfrost@...>
Date: Wed Jul 20, 2011 7:44 pm
Subject: Re: Chrome Path Mouseover
jonfrostsvg
Send Email Send Email
 
Ah, the good old days of ASV3.  There is much more interested in SVG these
days because it is built into browsers, but ASV was very well built.

Maybe there would be interest in an ASV fan club event where we discuss the
good old days, similar to the Moosefest - http://www.moosefest.org/  :-)




On Wed, Jul 20, 2011 at 2:16 PM, Sean Montague <couloir007@...> wrote:

> **
>
>
> http://greenworld.org/chrome-test.svg
>
> With chrome you need to move the mouse around until you hit the sweet
> spot. FF works well, but is so sensitive its hard to keep mouseover. IE
> with the old ASV 3 plugin is still the best, which I'm trying to
> mothball. I can't test IE9.
>
> Thanks!
> Sean
>


[Non-text portions of this message have been removed]

#64878 From: "David Dailey" <ddailey@...>
Date: Wed Jul 20, 2011 8:38 pm
Subject: RE: Chrome Path Mouseover
ddailey@...
Send Email Send Email
 
Hi Sean,



I think I concur that that are some look and feel differences between Webkit
and the others (I do have IE9

Each of the paths has had its stroke width from the <g> in which



stroke-width="0.22%"



I would probably try changing that to something like



stroke-width="3"



And see what happens. Your viewBox sets the coordinate system and the .22%
is defined relative to that. Looking at the height and width of the viewBox,
it is not too different from an ordinary screen so moving to absolute pixels
might behave more consistently. Not quite sure how browsers calculate their
onmouseover hot spot, particularly when a dash-array is present, but I'd be
tempted to play with that.



Another trick if that doesn't work (since I'm having some troubles getting
the hotspot with my screen resolution, even in Firefox) would be to
duplicate the group containing the path system with a <use> tag but lay it
down first, adding a wider stroke-width but making its stroke-opacity zero
so that it still receives mouse events but doesn't interfere with the visual
display.



Hope this helps, and maybe someone else will have another idea.



Cheers

David



From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
On Behalf Of Sean Montague
Sent: Wednesday, July 20, 2011 3:17 PM
To: svg-developers@yahoogroups.com
Subject: Re: [svg-developers] Chrome Path Mouseover





http://greenworld.org/chrome-test.svg

With chrome you need to move the mouse around until you hit the sweet
spot. FF works well, but is so sensitive its hard to keep mouseover. IE
with the old ASV 3 plugin is still the best, which I'm trying to
mothball. I can't test IE9.

Thanks!
Sean

On 07/20/2011 07:54 AM, David Dailey wrote:
>
> This is not an issue I'm aware of. Perhaps others have noticed something,
> but it sounds like a link to an example of the problem would be helpful.
>
> Good luck
>
> David
>
> From: svg-developers@yahoogroups.com
<mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> [mailto:svg-developers@yahoogroups.com
<mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>]
> On Behalf Of couloir007
> Sent: Wednesday, July 20, 2011 2:04 AM
> To: svg-developers@yahoogroups.com
<mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> Subject: [svg-developers] Chrome Path Mouseover
>
> Is chrome known to have issues with paths and mouseover events? In my svg
> with roads, my mouseover events will only fire on small segments of the
> path. I can't find much on this topic.
>
> Thanks!
>
> [Non-text portions of this message have been removed]
>
>

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]

#64879 From: Sean Montague <couloir007@...>
Date: Wed Jul 20, 2011 9:36 pm
Subject: Re: Chrome Path Mouseover
couloir007
Send Email Send Email
 
Hi David,

Than you for the response. I changed the stroke, and got rid of the
dasharray on the red. I did it for both, but it didn't improve anything,
so I put blue back to dasharray. The coordinates of geographical, and I
would like not to lose that.

Are there any examples where this is not an issue?

Thank you,
Sean

On 07/20/2011 04:38 PM, David Dailey wrote:
>
> Hi Sean,
>
> I think I concur that that are some look and feel differences between
> Webkit
> and the others (I do have IE9
>
> Each of the paths has had its stroke width from the <g> in which
>
> stroke-width="0.22%"
>
> I would probably try changing that to something like
>
> stroke-width="3"
>
> And see what happens. Your viewBox sets the coordinate system and the .22%
> is defined relative to that. Looking at the height and width of the
> viewBox,
> it is not too different from an ordinary screen so moving to absolute
> pixels
> might behave more consistently. Not quite sure how browsers calculate
> their
> onmouseover hot spot, particularly when a dash-array is present, but
> I'd be
> tempted to play with that.
>
> Another trick if that doesn't work (since I'm having some troubles getting
> the hotspot with my screen resolution, even in Firefox) would be to
> duplicate the group containing the path system with a <use> tag but lay it
> down first, adding a wider stroke-width but making its stroke-opacity zero
> so that it still receives mouse events but doesn't interfere with the
> visual
> display.
>
> Hope this helps, and maybe someone else will have another idea.
>
> Cheers
>
> David
>
> From: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> [mailto:svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>]
> On Behalf Of Sean Montague
> Sent: Wednesday, July 20, 2011 3:17 PM
> To: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> Subject: Re: [svg-developers] Chrome Path Mouseover
>
> http://greenworld.org/chrome-test.svg
>
> With chrome you need to move the mouse around until you hit the sweet
> spot. FF works well, but is so sensitive its hard to keep mouseover. IE
> with the old ASV 3 plugin is still the best, which I'm trying to
> mothball. I can't test IE9.
>
> Thanks!
> Sean
>
> On 07/20/2011 07:54 AM, David Dailey wrote:
> >
> > This is not an issue I'm aware of. Perhaps others have noticed
> something,
> > but it sounds like a link to an example of the problem would be helpful.
> >
> > Good luck
> >
> > David
> >
> > From: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> > <mailto:svg-developers%40yahoogroups.com>
> > [mailto:svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> > <mailto:svg-developers%40yahoogroups.com>]
> > On Behalf Of couloir007
> > Sent: Wednesday, July 20, 2011 2:04 AM
> > To: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> > <mailto:svg-developers%40yahoogroups.com>
> > Subject: [svg-developers] Chrome Path Mouseover
> >
> > Is chrome known to have issues with paths and mouseover events? In
> my svg
> > with roads, my mouseover events will only fire on small segments of the
> > path. I can't find much on this topic.
> >
> > Thanks!
> >
> > [Non-text portions of this message have been removed]
> >
> >
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>


[Non-text portions of this message have been removed]

Messages 64850 - 64879 of 66156   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help