/** * Created by TonyJiang on 16/8/29. */ import * as React from "react"; import Editor from "./Editor"; import {SpinnerComponent} from "./_components/SpinnerComponent"; import {PointF} from "../../../drawing/Unit"; import {autobind} from "core-decorators"; export class PointEditor extends Editor{ @autobind onChangeX(value){ this.setValue(new PointF(value, this.getValue().y)); } @autobind onChangeY(value){ this.setValue(new PointF(this.getValue().x, value)); } renderValueEditor(){ const value = this.getValue() as PointF; let pointX = null; let pointY = null; if(value){ pointX = value.x; pointY = value.y; } return (
); } }