Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add counter to log and clean up example app.

  • Loading branch information...
commit 1e76a0efbbe1b7feab714f745ff8777344876217 1 parent 45da03e
Chris Mather authored
View
1  examples/unfinished/reactive-vision/vision.js
@@ -40,6 +40,7 @@ if (Meteor.isClient) {
Meteor.startup(function () {
Meteor.ReactiveVision.onLog(function (msg) {
$('<li>').text(msg).appendTo('#logger');
+ $('.left')[0].scrollTop = $('#logger').height();
});
});
}
View
18 packages/reactive-vision/lib/reactive-vision.css
@@ -1,18 +0,0 @@
-.reactive-vision-hidden {
- background: orange;
- opacity: 0;
-}
-
-.reactive-vision-fadein {
- transition: opacity 1s linear;
- -webkit-transition: opacity 1s linear;
- -moz-transition: opacity 1s linear;
- opacity: .5;
-}
-
-.reactive-vision-fadeout {
- transition: opacity 1s linear;
- -webkit-transition: opacity 1s linear;
- -moz-transition: opacity 1s linear;
- opacity: 0;
-}
View
8 packages/reactive-vision/lib/reactive-vision.js
@@ -127,7 +127,7 @@
position: 'absolute',
background: self.options.background || 'orange',
padding: self.options.padding || '0px',
- border: self.options.border || '1px solid darkorange',
+ border: self.options.border || '1px solid red',
opacity: 0,
'z-index': 10000,
top: rect.top,
@@ -149,13 +149,14 @@
if (instance) return instance;
instance = this;
+ this._logCounter = 0;
this._log = [];
this._wrapped = [];
this._callbacks = [];
this.options = {
background: 'Orange',
padding: '0px',
- border: '1px solid DarkOrange'
+ border: '1px solid Red'
};
this.start();
@@ -178,6 +179,7 @@
},
clear: function () {
+ this._logCounter = 0;
this._log = [];
},
@@ -187,7 +189,7 @@
var name = options.name && '"' + options.name + '"';
type = (options.type || '') + ' ' + (name || '');
message = [
- (new Date).getTime(),
+ ++this._logCounter,
': ',
type ? '<' + type + '> ' : ' ',
msg
View
2  packages/reactive-vision/package.js
@@ -4,5 +4,5 @@ Package.describe({
Package.on_use(function (api) {
api.use(['jquery', 'session', 'domutils', 'deps', 'templating', 'underscore', 'spark'], 'client');
- api.add_files(['lib/reactive-vision.css', 'lib/reactive-vision.js'], 'client');
+ api.add_files(['lib/reactive-vision.js'], 'client');
});
Please sign in to comment.
Something went wrong with that request. Please try again.