Update X,Y from component method
See original GitHub issueHi, I’ve the next code:
<button @click="InitPosition()">blla</button>
<vue-draggable-resizable
v-if="DrillSelectorView"
:parent="true"
:x="testPosition['left']"
:y="testPosition['top']"
:w="460"
:h="245"
@dragstop="onDragstopDrillSelector"
>
<drill-selector/>
</vue-draggable-resizable>
data: () => ({
testPosition: {
left: 0,
top: 684
},
}),
mounted() {
this.InitPosition();
},
beforeUpdate() {
this.InitPosition();
},
initPosition: function() {
this.testPosition= {
left: 747,
top: 1000
};
}
Not the button or the beforeUpdate hook in working, only the mounted hook is working.
How should I update the init x,y location? Thank you
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
How to get a reference to component at specific x,y ...
measure is react native default method for any component to get update on it. Below is the example which help you to get...
Read more >XY Graph, initialize multiple sets of data, and update only one ...
At this point, my motors are moving dreadfully slowly, and I'm trying to find a way to make them run faster. I am...
Read more >Using React – amCharts 4 Documentation
If you want to update the chart, you can use the componentDidUpdate method. Here is an example: TypeScript / ES6 ... class App...
Read more >Component QML Type | Qt QML 6.4.1
In the same way, a Component definition contains a single top level item ... For example, the code below creates an object with...
Read more >d3/d3-selection: Transform the DOM by selecting elements ...
This method is used internally by selection.join to merge the enter and update selections after binding data. You can also merge explicitly, although...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@liquidvisual In your code when you drag, positions (x, y) do not change. Add
x: {{ x }}, y: {{ y }}
and you will see it. In order to fix it, you need@dragging="onDrag"
Thanks @TitanFighter, as always you’re definitely more helpful than me 😂