question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to manually update X and Y

See original GitHub issue

Is any way to manually update props: X and Y? My code didn’t work ( only prop text has been updated ):

<template>
  <div id="app">
    <div style="height: 300px; border: 1px solid blue; margin: 0">
      <template v-for="element in elements">
        <vue-draggable-resizable :parent="true" :resizable="true" :x.sync="element.x" :y.sync="element.y" style="border: 1px solid">
          <p :style="{ color: element.color }">{{ element.text }}<button @click="reset(element)">reset</button></p>
        </vue-draggable-resizable>
      </template>
    </div>
  </div>
</template>

<script>
import VueDraggableResizable from './components/vue-draggable-resizable'

export default {
  name: 'app',
  components: {
    'vue-draggable-resizable': VueDraggableResizable
  },
  data: function () {
    return {
      elements: [
        {
          text: 'Component 1',
          x: 0,
          y: 0,
          color: 'red'
        },
        {
          text: 'Component 3',
          x: 0,
          y: 200,
          color: 'blue'
        }
      ]
    }
  },
  methods: {
    reset: function (element) {
      element.x = 0
      element.y = 0
      element.text = 'RESET'
    }
  }
}
</script>

<style>
  .active {
    border: 1px dashed black;
  }
</style>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TitanFightercommented, Jul 3, 2018

@romucci , you can check this

0reactions
mauriciuscommented, Aug 25, 2018

This is fixed with the new major version available on the dev branch. Right now it is in beta, but I hope to release it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Update Pokémon X and Pokémon Y - Nintendo Support
Select the Pokémon X: Update or the Pokémon Y: Update and download it. Once the download is complete, the update will automatically be...
Read more >
How to Update Pokemon X and Pokemon Y on the ... - YouTube
http://gamexcess.netCan't play your new Pokemon game online? It probably needs to be patched. Here's a quick video on how to patch your game ......
Read more >
Update macOS on Mac - Apple Support
Choose System Settings. Then click General in the sidebar, and Software Update on the right. Or choose System Preferences. Then click Software ...
Read more >
Defining settings to update X,Y coordinates and geometry ...
Settings need to be defined for the Dynamic Update XY geoprocessing tool and the Toggle Automatic Update XY tool to be able to...
Read more >
Update 'x' and 'y' values of a trace using Plotly.update()
The data update object accepts an array containing an array of new x / y values for each trace you want to update....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found