[WIP] Ensure position of PointsEditor dialog remains centered after adding points

This commit is contained in:
Florian Rival
2017-11-19 15:26:18 +01:00
parent 72a65cb1d2
commit 862c012bb6
2 changed files with 3 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ export default class PointsEditor extends Component {
_onPointsUpdated = () => {
this.forceUpdate(); // Refresh the preview
if (this.props.onPointsUpdated) this.props.onPointsUpdated();
};
chooseAnimation = index => {

View File

@@ -263,6 +263,8 @@ export default class SpriteEditor extends Component {
object={spriteObject}
resourcesLoader={this.resourcesLoader}
project={project}
onPointsUpdated={() =>
this.forceUpdate() /*Force update to ensure dialog is properly positionned*/}
/>
</Dialog>
)}