Skip to content

Commit 2afae94

Browse files
committed
DVF-2516 fixed goog.base and changed exporting style
1 parent 9c96836 commit 2afae94

40 files changed

+999
-1669
lines changed

build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ def __getNotOptimizedCompilerArgs():
152152

153153
def __getOptimizedCompilerArgs():
154154
compilerArgs = [
155+
# '--variable_renaming_report out/vars.txt',
156+
# '--property_renaming_report out/props.txt',
157+
# '--output_manifest out/involved.txt',
155158
'--compilation_level ADVANCED_OPTIMIZATIONS',
156159
'--output_wrapper "(function(){%output%})();"',
157160
'--assume_function_wrapper',
158-
# '--output_manifest',
159161
# '--new_type_inf',
160162
'--env BROWSER',
161163
'--warning_level VERBOSE',
@@ -215,11 +217,13 @@ def __getDefaultCompilerArgs(outputFile):
215217
'--externs ' + EXTERNS_PATH,
216218
'--js="%s"' % os.path.join(SRC_PATH, '**.js'),
217219
'--js="%s"' % os.path.join(CLOSURE_LIBRARY_PATH, '**.js'),
220+
'--define "goog.DEBUG=false"',
218221
'--js_output_file ' + outputFile,
222+
'--language_in ECMASCRIPT3',
219223
'--charset UTF-8',
220224
'--dependency_mode=STRICT',
221225
'--entry_point acgraph',
222-
'--hide_warnings_for="contrib"'
226+
'--hide_warnings_for="goog"'
223227
]
224228
return result
225229

src/acgraph.js

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ goog.require('acgraph.vector.Renderer');
1919
goog.require('acgraph.vector.Text');
2020
goog.require('acgraph.vector.UnmanagedLayer');
2121
goog.require('acgraph.vector.primitives');
22-
goog.require('acgraph.vector.svg.Renderer');
23-
goog.require('acgraph.vector.svg.Stage');
24-
goog.require('acgraph.vector.vml.Clip');
25-
goog.require('acgraph.vector.vml.Renderer');
26-
goog.require('acgraph.vector.vml.Stage');
27-
goog.require('acgraph.vector.vml.Text');
22+
goog.require('acgraph.vector.svg');
23+
goog.require('acgraph.vector.vml');
2824
goog.require('goog.dom');
2925
goog.require('goog.userAgent');
3026

@@ -412,7 +408,7 @@ acgraph.hatchFill = function(opt_type, opt_color, opt_thickness, opt_size) {
412408
/**
413409
Creates an instance of the{@link acgraph.vector.PatternFill} class.<br/>
414410
To learn more about working with pattern fills, see: {@link acgraph.vector.PatternFill}
415-
@param {!acgraph.math.Rect} bounds The bounds of the pattern. Defines the size and offset of the pattern.
411+
@param {!goog.math.Rect} bounds The bounds of the pattern. Defines the size and offset of the pattern.
416412
@return {!acgraph.vector.PatternFill} An instance of the {@link acgraph.vector.PatternFill} class for method chaining.
417413
*/
418414
acgraph.patternFill = function(bounds) {
@@ -422,7 +418,7 @@ acgraph.patternFill = function(bounds) {
422418

423419
/**
424420
Creates an instance ot the {@link acgraph.vector.Clip} class.
425-
@param {(number|Array.<number>|acgraph.math.Rect|Object|null|acgraph.vector.Shape)=} opt_leftOrShape Left coordinate of bounds
421+
@param {(number|Array.<number>|goog.math.Rect|Object|null|acgraph.vector.Shape)=} opt_leftOrShape Left coordinate of bounds
426422
or rect or array or object representing bounds.
427423
@param {number=} opt_top Top coordinate.
428424
@param {number=} opt_width Width of the rect.
@@ -535,20 +531,22 @@ acgraph.updateReferences = function() {
535531
};
536532

537533
//exports
538-
goog.exportSymbol('acgraph.create', acgraph.create);
539-
goog.exportSymbol('acgraph.type', acgraph.type);
540-
goog.exportSymbol('acgraph.server', acgraph.server);
541-
goog.exportSymbol('acgraph.StageType.SVG', acgraph.StageType.SVG);
542-
goog.exportSymbol('acgraph.StageType.VML', acgraph.StageType.VML);
543-
goog.exportSymbol('acgraph.rect', acgraph.rect);
544-
goog.exportSymbol('acgraph.circle', acgraph.circle);
545-
goog.exportSymbol('acgraph.ellipse', acgraph.ellipse);
546-
goog.exportSymbol('acgraph.path', acgraph.path);
547-
goog.exportSymbol('acgraph.text', acgraph.text);
548-
goog.exportSymbol('acgraph.layer', acgraph.layer);
549-
goog.exportSymbol('acgraph.image', acgraph.image);
550-
goog.exportSymbol('acgraph.hatchFill', acgraph.hatchFill);
551-
goog.exportSymbol('acgraph.patternFill', acgraph.patternFill);
552-
goog.exportSymbol('acgraph.clip', acgraph.clip);
553-
goog.exportSymbol('acgraph.useAbsoluteReferences', acgraph.useAbsoluteReferences);
554-
goog.exportSymbol('acgraph.updateReferences', acgraph.updateReferences);
534+
(function() {
535+
goog.exportSymbol('acgraph.create', acgraph.create);
536+
goog.exportSymbol('acgraph.type', acgraph.type);
537+
goog.exportSymbol('acgraph.server', acgraph.server);
538+
goog.exportSymbol('acgraph.StageType.SVG', acgraph.StageType.SVG);
539+
goog.exportSymbol('acgraph.StageType.VML', acgraph.StageType.VML);
540+
goog.exportSymbol('acgraph.rect', acgraph.rect);
541+
goog.exportSymbol('acgraph.circle', acgraph.circle);
542+
goog.exportSymbol('acgraph.ellipse', acgraph.ellipse);
543+
goog.exportSymbol('acgraph.path', acgraph.path);
544+
goog.exportSymbol('acgraph.text', acgraph.text);
545+
goog.exportSymbol('acgraph.layer', acgraph.layer);
546+
goog.exportSymbol('acgraph.image', acgraph.image);
547+
goog.exportSymbol('acgraph.hatchFill', acgraph.hatchFill);
548+
goog.exportSymbol('acgraph.patternFill', acgraph.patternFill);
549+
goog.exportSymbol('acgraph.clip', acgraph.clip);
550+
goog.exportSymbol('acgraph.useAbsoluteReferences', acgraph.useAbsoluteReferences);
551+
goog.exportSymbol('acgraph.updateReferences', acgraph.updateReferences);
552+
})();

src/deps.js

Lines changed: 19 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

src/events/BrowserEvent.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ acgraph.events.BrowserEvent.prototype.getOriginalEvent = function() {
108108
};
109109

110110
//exports
111-
acgraph.events.BrowserEvent.prototype['stopPropagation'] = acgraph.events.BrowserEvent.prototype.stopPropagation;
112-
acgraph.events.BrowserEvent.prototype['stopWrapperPropagation'] = acgraph.events.BrowserEvent.prototype.stopWrapperPropagation;
113-
acgraph.events.BrowserEvent.prototype['preventDefault'] = acgraph.events.BrowserEvent.prototype.preventDefault;
111+
(function() {
112+
var proto = acgraph.events.BrowserEvent.prototype;
113+
proto['stopPropagation'] = proto.stopPropagation;
114+
proto['stopWrapperPropagation'] = proto.stopWrapperPropagation;
115+
proto['preventDefault'] = proto.preventDefault;
116+
})();

0 commit comments

Comments
 (0)