-
Notifications
You must be signed in to change notification settings - Fork 45
New format for layout file #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
284625c to
804ce4e
Compare
|
https://github.com/thinreports/thinreports-generator/blob/master/examples/list_events/list_events_0_8.tlf --- a/examples/list_events/list_events.tlf
+++ b/examples/list_events/list_events.tlf
@@ -132,7 +132,7 @@
"height": 50,
"translate": {
"x": 0,
- "y": -111.9
+ "y": -161.9
},
"items": [
{
@@ -219,7 +219,7 @@
"height": 50,
"translate": {
"x": 0,
- "y": -118.5
+ "y": -218.5
},
"items": [
{
@@ -358,4 +358,4 @@
20
]
}変更後の値は元の y 座標。 |
|
https://github.com/thinreports/thinreports-generator/blob/master/examples/tblock_styles/tblock_styles.tlf |
|
|
[Q] |
としましょう。 |
これは修正済み? |
src/app/core/tblockshape.js
Outdated
| goog.object.extend(hash, { | ||
| 'reference-id': this.getRefId(), | ||
| 'value': this.getDefaultValueOfLink(), | ||
| 'mulitple-line': this.isMultiMode(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo multiple
|
[Q] |
|
[Q] word-wrap: "" は返さない。デフォルト値は言語設定によって変化する。 |
|
[Q] page-number: 同意見。"report" というリストがあったらおかしなことになる。 |
|
TODO:
DONE:
|
detail の高さ分を translate.y から引けば値が正しくなる。 |
95832fd to
699ccee
Compare
| thin.core.AbstractTextGroup.prototype.setKerning = function(spacing) { | ||
| var layout = this.getLayout(); | ||
| var element = this.getElement(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing は何が入る可能性があるの?コードでそれを表現しておいたほうが、あとでわかりやすいと思う。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#38 の負債。0.6 から継続して使用している 0.8 のレイアウトファイルは kerning が NaN になってしまっている。
0.9 で一掃する。1.0 では消すコードとなるので、メソッド化して deprecated とする。
/**
* @deprecated See: https://github.com/thinreports/thinreports-editor/issues/38
* @param {string|number} spacing
* @return {string}
*/
thin.core.AbstractTextGroup.prototype.convertKerningToDefaultInSince06 = function(spacing) {
if (isNaN(Number(spacing))) {
spacing = thin.core.TextStyle.DEFAULT_KERNING;
}
return spacing;
};
/**
* @param {string} spacing
*/
thin.core.AbstractTextGroup.prototype.setKerning = function(spacing) {
var layout = this.getLayout();
var element = this.getElement();
spacing = this.convertKerningToDefaultInSince06(spacing);| * @return {goog.math.Coordinate} | ||
| */ | ||
| thin.core.ShapeStructure.BLANK_ = ''; | ||
| thin.core.ShapeStructure.getTransLateCoordinate = function(transformElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[いつか直したい] getTranslate なんだよなぁ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecated なメソッドなので 1.0 では消えます。
|
[Q] 古いレイアウトを開くところの流れがわからないんだけど、
であってる? |
| pageMarginLeft.setValue(thin.layout.FormatPage.DEFAULT_SETTINGS['margin-left']); | ||
| pageMarginRight.setValue(thin.layout.FormatPage.DEFAULT_SETTINGS['margin-right']); | ||
| var defaultMargin = thin.layout.FormatPage.DEFAULT_SETTINGS['margin']; | ||
| pageMarginTop.setValue(defaultMargin[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
順番の仕様が曖昧なので、以下のようにしよう。 generator の方も修正する。
[top, right, bottom, left]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あい。Editorは大丈夫だと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ん?修正は必要だよね?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
再設定したらおかしくなることが判明。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
再設定したらおかしくなることが判明。
そもそも順番が違うと思う。今のコードを見る限り、 [top, bottom, left, right] になってる気がする。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ですな。勘違いしていた。
古いフォーマットの場合を詳しく説明すると、次の流れになる。
|
なるほど。それぞれのコンテキストでクラスを分けれると良かったかもね(詳しく見てないので、そうなってるかもしれんが)まあ、変換のところは寿命が短いし、可能なら改善するぐらいでいいので、今回どうこうって話じゃないです。 |
|
Release 0.9.0 #59 と衝突する内容があるので、一旦、過去のコミットを改変します。 |
33e0091 to
e6309d6
Compare
あー、 |
ほほう。調べてみる。 |
e6309d6 to
32df8e9
Compare
32df8e9 to
1965632
Compare
|
src/app/core/imageshape.js
Outdated
| var content = this.getFile().getContent(); | ||
| if (/^data:(.+?);base64,(.+)/.test(content)) { | ||
| goog.object.set(object, 'data', { | ||
| 'mime-type': RegExp.$1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rake dev:check で imageshape.js:468: WARNING - References to the global RegExp object prevents optimization of regular expressions. と出ていたのを無視してビルドしたが、該当箇所が最適化されており、動作しない。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match でやれば良いのでは?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そうです。チャレンジなうです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
content が undefined であることが原因みたいです。


Refer to: thinreports/thinreports#4