Fixed broken line rendering in list#62
Merged
hidakatsuya merged 1 commit intomasterfrom Jul 24, 2016
Merged
Conversation
| thin.core.Line.prototype.setLeft = function(left) { | ||
| thin.core.Line.prototype.setLeft_ = function(left) { | ||
| left = thin.numberWithPrecision(left - this.getParentTransLateX()); | ||
| this.left_ = left; |
Member
There was a problem hiding this comment.
this.left_ = thin.numberWithPrecision(left - this.getParentTransLateX());
で良くない?
360d4f0 to
918a18d
Compare
This was referenced Jul 24, 2016
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Editor v0.9.0 において list 上に描画された line 図形がある tlf ファイルを開くと list の translate 値の分だけズレる不具合を修正しました。
※ すでにズレた座標で tlf ファイルを保存している場合は手作業で元の位置に戻す必要があります。
原因
list内に描画されたlineが存在するtlfを開く時にlineの再描画に使用する Function はそれぞれ依存しているため left, top, width, height のいずれかの値がなければ正しく描画位置が計算されない状態となっていた。
さらに list の translate 値の計算も重複して行われていたため。
修正方法
単純にプロパティ値を設定するための internal な Function に切り離し、tlf を開く時に使用することで解決した。