我想重写值,以便仅更改现有变量但不添加任何其他变量。
例如:
rectangle : {
"width" : 0,
"height" : 0,
"r" : 0,
"stroke" : "#000000",
"stroke-width" : 1,
"stroke-dasharray" : "No",
"fill-opacity" : 1.0,
"stroke-opacity" : 1.0,
"rotation" : 0,
"transform" : ""
}
需要覆盖
_newProperties = {
"stroke" : "#FFFFFF",
"strokewidth" : 3,
"stroke-dasharray" : "No",
"font-size" : 12,
"font-weight" : "normal",
"font-style" : "normal",
},
结果应该是:(不应附加字体)
rectangle : {
"width" : 0,
"height" : 0,
"r" : 0,
"stroke" : "#FFFFFF",
"stroke-width" : 3,
"stroke-dasharray" : "No",
"fill-opacity" : 1.0,
"stroke-opacity" : 1.0,
"rotation" : 0,
"transform" : ""
}