File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -1045,6 +1045,23 @@ acgraph.vector.PathBase.boundsCalculationMap_ = (function() {
10451045// Serialize
10461046//
10471047//----------------------------------------------------------------------------------------------------------------------
1048+ /**
1049+ * Serialize only path arguments. For copy path data purposes.
1050+ * @param {Object= } opt_data .
1051+ * @return {Object }
1052+ */
1053+ acgraph . vector . PathBase . prototype . serializePathArgs = function ( opt_data ) {
1054+ var data = opt_data || { } ;
1055+ data [ 'closePoint' ] = this . closePoint_ ? this . closePoint_ . slice ( ) : [ ] ;
1056+ data [ 'currentPoint' ] = this . currentPoint_ ? this . currentPoint_ . slice ( ) : [ ] ;
1057+ data [ 'segments' ] = this . segments_ . slice ( ) ;
1058+ data [ 'count' ] = this . count_ . slice ( ) ;
1059+ data [ 'arguments' ] = this . arguments_ . slice ( ) ;
1060+
1061+ return data ;
1062+ } ;
1063+
1064+
10481065/** @inheritDoc */
10491066acgraph . vector . PathBase . prototype . deserialize = function ( data ) {
10501067 this . closePoint_ = data [ 'closePoint' ] ;
@@ -1061,11 +1078,7 @@ acgraph.vector.PathBase.prototype.deserialize = function(data) {
10611078acgraph . vector . PathBase . prototype . serialize = function ( ) {
10621079 var data = goog . base ( this , 'serialize' ) ;
10631080 data [ 'type' ] = 'path' ;
1064- data [ 'closePoint' ] = this . closePoint_ ? this . closePoint_ . slice ( ) : [ ] ;
1065- data [ 'currentPoint' ] = this . currentPoint_ ? this . currentPoint_ . slice ( ) : [ ] ;
1066- data [ 'segments' ] = this . segments_ . slice ( ) ;
1067- data [ 'count' ] = this . count_ . slice ( ) ;
1068- data [ 'arguments' ] = this . arguments_ . slice ( ) ;
1081+ data = this . serializePathArgs ( data ) ;
10691082 return data ;
10701083} ;
10711084
You can’t perform that action at this time.
0 commit comments