MCPcopy
hub / github.com/methodofaction/Method-Draw / xform

Function xform

src/js/lib/jquery.jgraduate.js:658–669  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656 var c_y = cy;
657
658 function xform() {
659 var rot = angle?'rotate(' + angle + ',' + c_x + ',' + c_y + ') ':'';
660 if(scale_x === 1 && scale_y === 1) {
661 curGradient.removeAttribute('gradientTransform');
662// $('#ang').addClass('dis');
663 } else {
664 var x = -c_x * (scale_x-1);
665 var y = -c_y * (scale_y-1);
666 curGradient.setAttribute('gradientTransform', rot + 'translate(' + x + ',' + y + ') scale(' + scale_x + ',' + scale_y + ')');
667// $('#ang').removeClass('dis');
668 }
669 }
670
671 function dragColor(evt) {
672 wasDragged = true;

Callers 3

onCoordDragFunction · 0.85
setSliderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected