Skip to content

Commit 5670beb

Browse files
Added path to text exports, added file overview to graphics.min.js
1 parent 858c37b commit 5670beb

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

build.py

100644100755
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import platform
1010
import shlex
1111
import time
12+
import json
13+
import datetime
1214

1315
# =======================================================================================================================
1416
# Project paths
@@ -142,6 +144,17 @@ def wrapper():
142144
# =======================================================================================================================
143145
# Build project
144146
# =======================================================================================================================
147+
def __get_version():
148+
f = open(os.path.join(PROJECT_PATH, 'package.json'));
149+
package_json = json.loads(f.read());
150+
f.close()
151+
return package_json['version']
152+
153+
154+
def __get_file_overview():
155+
return "/**\n * GraphicsJS is a lightweight JavaScript graphics library with an intuitive API, based on SVG/VML technology.\n * Version: %s (%s)\n * License: BSD 3-clause\n * Copyright: AnyChart.com %s. All rights reserved.\n */\n" % (__get_version(), datetime.datetime.now().strftime("%Y-%m-%d"), str(datetime.datetime.now().year))
156+
157+
145158
def __getNotOptimizedCompilerArgs():
146159
compilerArgs = [
147160
'--compilation_level WHITESPACE_ONLY',
@@ -159,7 +172,7 @@ def __getOptimizedCompilerArgs():
159172
'--language_out ECMASCRIPT3',
160173
'--assume_function_wrapper',
161174
'--use_types_for_optimization true',
162-
'--output_wrapper "(function(){%output%})();"',
175+
'--output_wrapper "' + __get_file_overview() + '(function(){%output%})();"',
163176
'--env BROWSER',
164177
'--extra_annotation_name "includeDoc"',
165178
'--extra_annotation_name "illustration"',

src/deps.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vector/Text.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,7 @@ acgraph.vector.Text.prototype.disposeInternal = function() {
19191919
proto['text'] = proto.text;
19201920
proto['style'] = proto.style;
19211921
proto['htmlText'] = proto.htmlText;
1922+
proto['path'] = proto.path;
19221923
proto['x'] = proto.x;
19231924
proto['y'] = proto.y;
19241925
proto['fontSize'] = proto.fontSize;

0 commit comments

Comments
 (0)