mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-31 23:40:27 +02:00
change '_.extend' to 'Object.assign'
This commit is contained in:
parent
7ae05ce932
commit
052aa1e299
13 changed files with 27 additions and 27 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue