You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
In my app, I want to show the complete path of the motion when I trigger a loop. It works for single pairs (x,y) but does not work for an array of pairs.
When button click, it calls
this.state = {
xAxis1: [],
yAxis1: [],
newXAxis: [],
newYAxis: []
}
props.position.forEach(props => {
var a = document.getElementById(props);
var codinates = a.getBoundingClientRect();
var x = codinates.left + 35;
var y = codinates.top + 5;
this.state.newXAxis1.push(x);
this.state.newYAxis1.push(y);
});
this.setState({ xAxis1: this.state.newXAxis});
this.setState({ yAxis1: this.state.newYAxis });
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
In my app, I want to show the complete path of the motion when I trigger a loop. It works for single pairs (x,y) but does not work for an array of pairs.
When button click, it calls
Under the render()
Simply, what I want is, move the circle from (x1,y1) -> (x2,y2) -> (x3,y3)
Instead of (x1,y1) -> (x3,y3)
Beta Was this translation helpful? Give feedback.
All reactions