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

Re: [svg-developers] Methods getScreenBBox(), getBBox(), getScreenCTM() ?

Expand Messages
  • yannick.bochatay@free.fr
    Hi Manfred, you only need to test if the method exists : var myElmt = document.getElementById( myElmt ); var box; if (myElmt.getScreenBBox) { box =
    Message 1 of 4 , May 31, 2012
    • 0 Attachment
      Hi Manfred,
      you only need to test if the method exists :

      var myElmt = document.getElementById('myElmt');
      var box;

      if (myElmt.getScreenBBox) {
      box = myElmt.getScreenBBox();
      } else {
      /* fallback */
      }


      Cheers,
      Yannick


      ----- Mail original -----
      De: "Manfred Staudinger" <manfred.staudinger@...>
      À: svg-developers@yahoogroups.com
      Envoyé: Vendredi 1 Juin 2012 00:34:20
      Objet: Re: [svg-developers] Methods getScreenBBox(), getBBox(), getScreenCTM() ?






      Hi Yannick,
      thanks for the fast answer: so the problem is reduced to getScreenBBox
      and I'll try your proposed getBoundingClientRect method. Do you know a
      feature string to test for the getScreenBBox method?

      Regards,
      Manfred

      On 31/05/2012, yannick.bochatay@... < yannick.bochatay@... > wrote:
      > Hi Manfred,
      > getBBox and getScreenCTM are implemented in all modern browsers (IE>=9).
      > Unfortunately there's no ideal workaround for getScreenBBox, as you can read
      > here :
      > http://groups.google.com/group/lib-gwt-svg/browse_thread/thread/1560b1282433fbd5
      > The simpliest is probably to use the getBoundingClientRect method.
      > Regards,
      > Yannick
      >
      > ----- Mail original -----
      > De: "Manfred Staudinger" < manfred.staudinger@... >
      > À: "svg-developers" < svg-developers@yahoogroups.com >
      > Envoyé: Jeudi 31 Mai 2012 12:57:25
      > Objet: [svg-developers] Methods getScreenBBox(), getBBox(), getScreenCTM()
      > ?
      >
      >
      >
      >
      >
      >
      > Hi,
      > Where to find the feature strings to test if the methods
      > getScreenBBox(), getBBox(), getScreenCTM() are available? Looking also
      > for scriptbased fallback solutions.
      >
      > Regards,
      > Manfred
      >
      >
      >
      >
      > ------------------------------------
      >
      > -----
      > To unsubscribe send a message to:
      > svg-developers-unsubscribe@yahoogroups.com
      > -or-
      > visit http://groups.yahoo.com/group/svg-developers and click "edit my
      > membership"
      > ----Yahoo! Groups Links
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.