Switch Random.id() to Math.random() for triggering reactive updates. Random.id() is taking 40ms on Chrome for some reason

This commit is contained in:
Erik Ziegler committed 2017-10-25 13:11:44 +02:00
1 parent 05d9a41f45
commit 37fff25b50
7 files changed
+16 -17

No files matched your search

@@ -212,7 +212,7 @@ Template.stageSortable.events({
}
// Update the Session variable to the UI re-renders
Session.set('LayoutManagerUpdated', Random.id());
Session.set('LayoutManagerUpdated', Math.random());
}, options);
},
@@ -234,7 +234,7 @@ Template.stageSortable.events({
ProtocolEngine.stage = newIndex;
// Update the Session variable to the UI re-renders
Session.set('LayoutManagerUpdated', Random.id());
Session.set('LayoutManagerUpdated', Math.random());
},
'click .moveStageDown': function() {
// Get the old and new indices following a 'sort' event
@@ -254,6 +254,6 @@ Template.stageSortable.events({
ProtocolEngine.stage = newIndex;
// Update the Session variable to the UI re-renders
Session.set('LayoutManagerUpdated', Random.id());
Session.set('LayoutManagerUpdated', Math.random());
}
});