change '_.extend' to 'Object.assign'

This commit is contained in:
Hongarc 2018-12-01 06:07:06 +07:00
parent 7ae05ce932
commit 052aa1e299
13 changed files with 27 additions and 27 deletions

View file

@ -13,7 +13,7 @@ var VisBase = Backbone.Model.extend({
animateAttrKeys: function(keys, attrObj, speed, easing) {
// either we animate a specific subset of keys or all
// possible things we could animate
keys = _.extend(
keys = Object.assign(
{},
{
include: ['circle', 'arrow', 'rect', 'path', 'text'],
@ -26,7 +26,7 @@ var VisBase = Backbone.Model.extend({
// safely insert this attribute into all the keys we want
_.each(keys.include, function(key) {
attr[key] = _.extend(
attr[key] = Object.assign(
{},
attr[key],
attrObj

View file

@ -58,7 +58,7 @@ var VisBase = Backbone.Model.extend({
animateAttrKeys: function(keys, attrObj, speed, easing) {
// either we animate a specific subset of keys or all
// possible things we could animate
keys = _.extend(
keys = Object.assign(
{},
{
include: ['circle', 'arrow', 'rect', 'path', 'text'],
@ -71,7 +71,7 @@ var VisBase = Backbone.Model.extend({
// safely insert this attribute into all the keys we want
_.each(keys.include, function(key) {
attr[key] = _.extend(
attr[key] = Object.assign(
{},
attr[key],
attrObj

View file

@ -104,7 +104,7 @@ var Visualization = Backbone.View.extend({
makeOrigin: function(options) {
// oh god, here we go. We basically do a bizarre form of composition here,
// where this visualization actually contains another one of itself.
this.originVis = new Visualization(_.extend(
this.originVis = new Visualization(Object.assign(
{},
// copy all of our options over, except...
this.options,