Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebug lite breaks when using angular.js - Issue #3 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions content/firebug1.4/trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ this.initialize = function()
{
if (!this.messageQueue)
this.messageQueue = [];

for (var name in traceOptions)
this[name] = traceOptions[name];
this[name] = traceOptions[name];
};

// ************************************************************************************************
Expand All @@ -46,10 +46,10 @@ this.dumpStack = function()
this.flush = function(module)
{
this.module = module;

var queue = this.messageQueue;
this.messageQueue = [];

for (var i = 0; i < queue.length; ++i)
this.writeMessage(queue[i][0], queue[i][1], queue[i][2]);
};
Expand All @@ -65,13 +65,13 @@ this.logFormatted = function(objects, className)
{
var html = this.DBG_TIMESTAMP ? [getTimestamp(), " | "] : [];
var length = objects.length;

for (var i = 0; i < length; ++i)
{
appendText(" ", html);

var object = objects[i];

if (i == 0)
{
html.push("<b>");
Expand All @@ -81,21 +81,24 @@ this.logFormatted = function(objects, className)
else
appendText(object, html);
}
return this.logRow(html, className);

return this.logRow(html, className);
};

this.logRow = function(message, className)
{
var panel = this.getPanel();

if (panel && panel.panelNode)
this.writeMessage(message, className);
else
{
if (typeof this.messageQueue == 'undefined') {
this.messageQueue = [];
}
this.messageQueue.push([message, className]);
}

return this.LOG_COMMAND;
};

Expand All @@ -104,9 +107,9 @@ this.writeMessage = function(message, className)
var container = this.getPanel().containerNode;
var isScrolledToBottom =
container.scrollTop + container.offsetHeight >= container.scrollHeight;

this.writeRow.call(this, message, className);

if (isScrolledToBottom)
container.scrollTop = container.scrollHeight - container.offsetHeight;
};
Expand Down Expand Up @@ -137,7 +140,7 @@ function getTimestamp()
var now = new Date();
var ms = "" + (now.getMilliseconds() / 1000).toFixed(3);
ms = ms.substr(2);

return now.toLocaleTimeString() + "." + ms;
};

Expand Down