Skip to content

Fixed broken line rendering in list#62

Merged
hidakatsuya merged 1 commit intomasterfrom
fix_render_line
Jul 24, 2016
Merged

Fixed broken line rendering in list#62
hidakatsuya merged 1 commit intomasterfrom
fix_render_line

Conversation

@maeda-m
Copy link
Copy Markdown
Member

@maeda-m maeda-m commented Jul 21, 2016

Editor v0.9.0 において list 上に描画された line 図形がある tlf ファイルを開くと list の translate 値の分だけズレる不具合を修正しました。
※ すでにズレた座標で tlf ファイルを保存している場合は手作業で元の位置に戻す必要があります。

原因

list内に描画されたlineが存在するtlfを開く時にlineの再描画に使用する Function はそれぞれ依存しているため left, top, width, height のいずれかの値がなければ正しく描画位置が計算されない状態となっていた。
さらに list の translate 値の計算も重複して行われていたため。

修正方法

単純にプロパティ値を設定するための internal な Function に切り離し、tlf を開く時に使用することで解決した。

@maeda-m maeda-m added the bug Something isn't working label Jul 21, 2016
@maeda-m maeda-m added this to the 0.9.1 milestone Jul 21, 2016
@hidakatsuya hidakatsuya changed the title Fixed line rendering in list Fixed broken line rendering in list Jul 21, 2016
Comment thread src/app/core/line.js Outdated
thin.core.Line.prototype.setLeft = function(left) {
thin.core.Line.prototype.setLeft_ = function(left) {
left = thin.numberWithPrecision(left - this.getParentTransLateX());
this.left_ = left;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.left_ = thin.numberWithPrecision(left - this.getParentTransLateX());

で良くない?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants