Loading ...
Sorry, an error occurred while loading the content.

Re: Demonstration of SVG Javascript Analogue Clocks

Expand Messages
  • jookeda
    Last time I played with the SVG DOM, Gecko easily had the closest to complete implementation. E.g., it implemented SVGMatrix and you could do circle.r.baseVal
    Message 1 of 10 , Apr 2, 2006
    • 0 Attachment
      Last time I played with the SVG DOM, Gecko easily had the closest to
      complete implementation. E.g., it implemented SVGMatrix and you could
      do circle.r.baseVal = 10 instead of circle.setAttribute("r", "10").
      ASV, on the other hand, really didn't support any of that. Things
      might have changed recently, however (I haven't tested the SVG DOM in
      Opera).

      As for analogue clocks, I also have one here:
      http://www.browserland.org/scripts/svgclock/

      Instead of using the rotation transform, I just use a little bit of
      math (polar coordinates) to set the (x2,y2) coordinates of 3 line
      segments.

      Lastly, it is very possible to serve IE6 actual XML (XHTML+SVG) and
      get it to render inline SVG via ASV. It just requires an XSLT
      transformation which takes unprefixed markup and dumps prefixed
      markup, and inserts the <?import?> hacks into the head of the
      document. I have something that does there here:
      http://www.browserland.org/xmlstuff/cxd/
      (It also does primitive XInclude and MathML transforms too). Instead
      of inserting all the hacks and prefixing your XML directly in your
      markup, the xslt document will take care of that for you, and you can
      write inline markup as you would for a real xml-aware browser such as
      Opera or Firefox.



      -Jason Davis


      --- In svg-developers@yahoogroups.com, "Kam-Hung Soh"
      >
      > I think it should be possible to write something like the following to
      > change a circle's radius, "c.r = 50", rather than the more verbose
      > "c.setAttribute('r', '50')".
      >
      > More stuff to try when I have some spare time!
      >
      > --
      > Kam-Hung Soh
      > http://kamhungsoh.blogspot.com - It Mostly Works
      > http://members.optusnet.com.au/~khsoh - Software That Mostly Works
      >
    • Christophe Strobbe
      Hi, ... You d be surprised at what some people do with HTML and JavaScript: there s even JavaScript for an analogue clock that follows your mouse pointer
      Message 2 of 10 , Apr 3, 2006
      • 0 Attachment
        Hi,

        At 06:14 2/04/2006, Kam-Hung Soh wrote:
        >Hi,
        >
        >Here's a Web page showing SVG-drawn analogue clocks animated by
        >Javascript. It's the simplest thing I could imagine that could not be
        >easily done using just XHTML + Javascript because it involves rotating
        >the hands of a clock.

        You'd be surprised at what some people do with HTML and JavaScript:
        there's even JavaScript for an analogue clock that follows your mouse
        pointer (well, at least in IE): http://www.hypergurl.com/clockcursor.html.

        Regards,

        Christophe


        >See: http://members.optusnet.com.au/~khsoh/000d.xhtml

        --
        Christophe Strobbe
        K.U.Leuven - Departement of Electrical Engineering - Research Group on
        Document Architectures
        Kasteelpark Arenberg 10 - 3001 Leuven-Heverlee - BELGIUM
        tel: +32 16 32 85 51
        http://www.docarch.be/


        Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
      • Kam-Hung Soh
        ... http://www.hypergurl.com/clockcursor.html. Aaah, I knew I d get roasted for making such a generalization. :) -- Kam-Hung Soh
        Message 3 of 10 , Apr 3, 2006
        • 0 Attachment
          --- In svg-developers@yahoogroups.com, Christophe Strobbe
          <christophe.strobbe@...> wrote:
          >
          > Hi,
          >
          > At 06:14 2/04/2006, Kam-Hung Soh wrote:
          > >Hi,
          > >
          > >Here's a Web page showing SVG-drawn analogue clocks animated by
          > >Javascript. It's the simplest thing I could imagine that could not be
          > >easily done using just XHTML + Javascript because it involves rotating
          > >the hands of a clock.
          >
          > You'd be surprised at what some people do with HTML and JavaScript:
          > there's even JavaScript for an analogue clock that follows your mouse
          > pointer (well, at least in IE):
          http://www.hypergurl.com/clockcursor.html.

          Aaah, I knew I'd get roasted for making such a generalization. :)

          --
          Kam-Hung Soh
          http://kamhungsoh.blogspot.com - It Mostly Works
          http://members.optusnet.com.au/~khsoh - Software That Mostly Works
        Your message has been successfully submitted and would be delivered to recipients shortly.