docs/examples/libs/Leaflet.draw.drag-src.js
function(matrix) {
      var skew = this._skew;

      if (!skew) {
        skew = this._createElement('skew');
        this._container.appendChild(skew);
        skew.style.behavior = 'url(#default#VML)';
        this._skew = skew;
      }

      // handle skew/translate separately, cause it's broken
      var mt = matrix[0].toFixed(8) + " " + matrix[1].toFixed(8) + " " +
        matrix[2].toFixed(8) + " " + matrix[3].toFixed(8) + " 0 0";
      var offset = Math.floor(matrix[4]).toFixed() + ", " +
        Math.floor(matrix[5]).toFixed() + "";

      var s = this._container.style;
      var l = parseFloat(s.left);
      var t = parseFloat(s.top);
      var w = parseFloat(s.width);
      var h = parseFloat(s.height);

      if (isNaN(l)) l = 0;
      if (isNaN(t)) t = 0;
      if (isNaN(w) || !w) w = 1;
      if (isNaN(h) || !h) h = 1;

      var origin = (-l / w - 0.5).toFixed(8) + " " + (-t / h - 0.5).toFixed(8);

      skew.on = "f";
      skew.matrix = mt;
      skew.origin = origin;
      skew.offset = offset;
      skew.on = true;
    }
function(matrix) {
      var skew = this._skew;

      if (!skew) {
        skew = this._createElement('skew');
        this._container.appendChild(skew);
        skew.style.behavior = 'url(#default#VML)';
        this._skew = skew;
      }

      // handle skew/translate separately, cause it's broken
      var mt = matrix[0].toFixed(8) + " " + matrix[1].toFixed(8) + " " +
        matrix[2].toFixed(8) + " " + matrix[3].toFixed(8) + " 0 0";
      var offset = Math.floor(matrix[4]).toFixed() + ", " +
        Math.floor(matrix[5]).toFixed() + "";

      var s = this._container.style;
      var l = parseFloat(s.left);
      var t = parseFloat(s.top);
      var w = parseFloat(s.width);
      var h = parseFloat(s.height);

      if (isNaN(l)) l = 0;
      if (isNaN(t)) t = 0;
      if (isNaN(w) || !w) w = 1;
      if (isNaN(h) || !h) h = 1;

      var origin = (-l / w - 0.5).toFixed(8) + " " + (-t / h - 0.5).toFixed(8);

      skew.on = "f";
      skew.matrix = mt;
      skew.origin = origin;
      skew.offset = offset;
      skew.on = true;
    }
function ( matrix ) { var skew = this . _skew ; if ( ! skew ) { skew = this . _createElement ( 'skew' ) ; this . _container . appendChild ( skew ) ; skew . style . behavior = 'url(#default#VML)' ; this . _skew = skew ; } // handle skew/translate separately, cause it's broken var mt = matrix [ 0 ] . toFixed ( 8 ) + " " + matrix [ 1 ] . toFixed ( 8 ) + " " + matrix [ 2 ] . toFixed ( 8 ) + " " + matrix [ 3 ] . toFixed ( 8 ) + " 0 0" ; var offset = Math . floor ( matrix [ 4 ] ) . toFixed ( ) + ", " + Math . floor ( matrix [ 5 ] ) . toFixed ( ) + "" ; var s = this . _container . style ; var l = parseFloat ( s . left ) ; var t = parseFloat ( s . top ) ; var w = parseFloat ( s . width ) ; var h = parseFloat ( s . height ) ; if ( isNaN ( l ) ) l = 0 ; if ( isNaN ( t ) ) t = 0 ; if ( isNaN ( w ) || ! w ) w = 1 ; if ( isNaN ( h ) || ! h ) h = 1 ; var origin = ( - l / w - 0.5 ) . toFixed ( 8 ) + " " + ( - t / h - 0.5 ) . toFixed ( 8 ) ; skew . on = "f" ; skew . matrix = mt ; skew . origin = origin ; skew . offset = offset ; skew . on = true ; }
Applies matrix transformation to VML
@param {Array.<Number>} matrix
Applies matrix transformation to VML