Skip to content

Commit 9c7bf51

Browse files
committed
Delete backward compatible processing for opening layout file
1 parent f290cc9 commit 9c7bf51

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

app/editor/layout/format.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -95,43 +95,6 @@ thin.layout.Format.prototype.state_;
9595
*/
9696
thin.layout.Format.parse = function(content) {
9797
var object = JSON.parse(content);
98-
var version = object['version'];
99-
100-
thin.Compatibility.applyIf(version, '<', '0.9.0', function() {
101-
var state = goog.object.clone(object['state']);
102-
var config = goog.object.clone(object['config']);
103-
var page = goog.object.clone(config['page']);
104-
105-
var margin = [];
106-
goog.array.insertAt(margin, page['margin-top'], 0);
107-
goog.array.insertAt(margin, page['margin-right'], 1);
108-
goog.array.insertAt(margin, page['margin-bottom'], 2);
109-
goog.array.insertAt(margin, page['margin-left'], 3);
110-
111-
var report = {
112-
'paper-type': page['paper-type'],
113-
'orientation': page['orientation'],
114-
'margin': margin
115-
};
116-
117-
if (thin.layout.FormatPage.isUserType(report['paper-type'])) {
118-
goog.object.extend(report, {
119-
'width': page['width'],
120-
'height': page['height']
121-
});
122-
}
123-
124-
goog.object.set(object, 'title', config['title']);
125-
goog.object.set(object, 'report', report);
126-
goog.object.set(object, 'items', object['svg']);
127-
goog.object.set(object, 'state', {
128-
'layout-guides': state['layout-guide']
129-
});
130-
131-
goog.object.remove(object, 'config');
132-
goog.object.remove(object, 'svg');
133-
});
134-
13598
return new thin.layout.Format(object);
13699
};
137100

0 commit comments

Comments
 (0)