Automation

pre pan

floorplans.pan(
node floorplan, 
int x, 
int y, 
int duration );

Moves (pans) a floorplan view.

Parameters

floorplan
(node) The floorplan to move.
x
(int) The horizontal offset relative to the left of the floorplan.
y
(int) The vertical offset relative to the top of the floorplan.
duration
(int) The duration of the pan animation, must be >0.

Source

floorplans/public/js/controls.js

More Information

This code should be implemented in JavaScript. For extra guidance, please see WPBeginner’s tutorial on adding custom javascript.

Example

<script type="text/javascript">

	var flrplan = document.querySelector( '.floorplan' );

	floorplans.pan( flrplan, -200, 100, 1200 );

</script>
filed under: