bobflux-monitor
Advanced tools
Comparing version 0.0.4 to 0.0.5
11
index.js
@@ -58,2 +58,3 @@ define(["require", "exports", 'node_modules/bobril/index', 'node_modules/fun-model/dist/src/index', './button', './rows', './textbox'], function (require, exports, b, index_1, button, rows, textbox) { | ||
info: stateStamp.time.toLocaleTimeString(), | ||
frames: stateStamp.frames, | ||
onGo: function () { | ||
@@ -78,4 +79,10 @@ index_1.setState(ctx.data.cursor, stateStamp.state); | ||
var callback = function (m, p) { | ||
if (p && typeof p === 'object') { | ||
data.stateStamps.push({ change: 'change', time: new Date(), state: p }); | ||
if (m && p && m.indexOf('Current state') >= 0) { | ||
if (!data.stateStamps.some(function (stateStamp) { return stateStamp.state === p; })) | ||
data.stateStamps.push({ | ||
change: 'change', | ||
time: new Date(), | ||
state: p, | ||
frames: b.frame() | ||
}); | ||
} | ||
@@ -82,0 +89,0 @@ }; |
13
index.ts
@@ -24,2 +24,3 @@ import * as b from 'node_modules/bobril/index'; | ||
time: Date; | ||
frames: number; | ||
} | ||
@@ -86,4 +87,6 @@ | ||
info: stateStamp.time.toLocaleTimeString(), | ||
frames: stateStamp.frames, | ||
onGo: () => { | ||
setState(ctx.data.cursor, stateStamp.state); | ||
b.invalidate(); | ||
@@ -106,4 +109,10 @@ }, | ||
let callback = (m, p) => { | ||
if (p && typeof p === 'object') { | ||
data.stateStamps.push({ change: 'change', time: new Date(), state: p }); | ||
if (m && p && m.indexOf('Current state') >= 0) { | ||
if (!data.stateStamps.some(stateStamp => stateStamp.state === p)) | ||
data.stateStamps.push({ | ||
change: 'change', | ||
time: new Date(), | ||
state: p, | ||
frames: b.frame() | ||
}); | ||
} | ||
@@ -110,0 +119,0 @@ }; |
{ | ||
"name": "bobflux-monitor", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Component for time travelling in bobflux application state history.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -5,2 +5,3 @@ import * as b from 'node_modules/bobril/index'; | ||
info: string; | ||
frames: number; | ||
onGo: () => void; | ||
@@ -7,0 +8,0 @@ onCopy: () => void; |
@@ -17,2 +17,3 @@ define(["require", "exports", 'node_modules/bobril/index', './button'], function (require, exports, b, button) { | ||
{ tag: 'div', children: ctx.data.info }, | ||
{ tag: 'div', children: 'Frames: ' + ctx.data.frames }, | ||
button.create({ title: 'GO', style: button.style.actionButton, onClick: ctx.data.onGo }), | ||
@@ -19,0 +20,0 @@ button.create({ title: 'COPY', style: button.style.actionButton, onClick: ctx.data.onCopy }) |
@@ -17,2 +17,3 @@ import * as b from 'node_modules/bobril/index'; | ||
info: string; | ||
frames: number; | ||
onGo: () => void; | ||
@@ -33,2 +34,3 @@ onCopy: () => void; | ||
{ tag: 'div', children: ctx.data.info }, | ||
{ tag: 'div', children: 'Frames: '+ ctx.data.frames }, | ||
button.create({ title: 'GO', style: button.style.actionButton, onClick: ctx.data.onGo }), | ||
@@ -35,0 +37,0 @@ button.create({ title: 'COPY', style: button.style.actionButton, onClick: ctx.data.onCopy }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16737
460