transformOrigin

Determines the transform origin point based on two elements' boxes. The method is primarily used in zoom/transfer effects.

Parameters

firstElementHTMLElementThe first element.
secondElementHTMLElementThe second element.

ReturnsObject An object with x and y fields that represent the transform origin point.

Example

<div id="foo" style="position: absolute; top:10px; left: 10px; height: 200px; width: 200px; border: 1px solid red;">foo</div>
<div id="bar" style="position: absolute; top:60px; left: 60px; height: 100px; width: 100px; border: 1px solid blue;">bar</div>
<script>
    console.log(kendo.effects.transformOrigin(kendo.effects.box("#bar"), kendo.effects.box("#foo"))); // x: 101, y: 101
</script>
In this article
Not finding the help you need? Improve this article