code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function consume(e)
{
e.consume(true);
} | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | consume | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
function move(e)
{
if (dragging) {
var dragX = Math.max(0, Math.min(e.pageX - offset.left + scrollOffset.left, maxWidth));
var dragY = Math.max(0, Math.min(e.pageY - offset.top + scrollOffset.top, maxHeight));
if (onmove)
onmove(element, dragX, dragY);
... | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | move | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
function start(e)
{
var rightClick = e.which ? (e.which === 3) : (e.button === 2);
if (!rightClick && !dragging) {
if (onstart)
onstart(element, e)
dragging = true;
maxHeight = element.clientHeight;
maxWidth = element.clientWidth;
... | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | start | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
function stop(e)
{
if (dragging) {
doc.removeEventListener("selectstart", consume, false);
doc.removeEventListener("dragstart", consume, false);
doc.removeEventListener("mousemove", move, false);
doc.removeEventListener("mouseup", stop, false);
if... | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | stop | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
set color(color)
{
var rgba = (color.rgba || color.rgb).slice(0);
if (rgba.length === 3)
rgba[3] = 1;
this.hsv = WebInspector.Spectrum.rgbaToHSVA(rgba[0], rgba[1], rgba[2], rgba[3]);
} | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | color | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
get color()
{
var rgba = WebInspector.Spectrum.hsvaToRGBA(this.hsv[0], this.hsv[1], this.hsv[2], this.hsv[3]);
var color;
if (rgba[3] === 1)
color = WebInspector.Color.fromRGB(rgba[0], rgba[1], rgba[2]);
else
color = WebInspector.Color.fromRGBA(rgba[0], rgba[... | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | color | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
get outputColorFormat()
{
var cf = WebInspector.StylesSidebarPane.ColorFormat;
var format = this._originalFormat;
if (this.hsv[3] === 1) {
// Simplify transparent formats.
if (format === cf.RGBA)
format = cf.RGB;
else if (format === cf.HSL... | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | outputColorFormat | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
get colorHueOnly()
{
var rgba = WebInspector.Spectrum.hsvaToRGBA(this.hsv[0], 1, 1, 1);
return WebInspector.Color.fromRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
} | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | colorHueOnly | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
set displayText(text)
{
this._displayElement.textContent = text;
} | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | displayText | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
get visible()
{
return this._popover.visible;
} | @param {Function=} onmove
@param {Function=} onstart
@param {Function=} onstop | visible | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/Spectrum.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/Spectrum.js | MIT |
get disabled()
{
return this._disabled;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | disabled | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
set disabled(x)
{
if (this._disabled === x)
return;
this._disabled = x;
this.element.disabled = x;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | disabled | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
get title()
{
return this._title;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | title | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
set title(x)
{
if (this._title === x)
return;
this._title = x;
this.element.title = x;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | title | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
get state()
{
return this._state;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | state | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
set state(x)
{
if (this._state === x)
return;
if (this.states === 2) {
if (x)
this.element.addStyleClass("toggled-on");
else
this.element.removeStyleClass("toggled-on");
} else {
if (x !== 0) {
t... | @extends {WebInspector.Object}
@constructor
@param {number=} states | state | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
get toggled()
{
if (this.states !== 2)
throw("Only used toggled when there are 2 states, otherwise, use state");
return this.state;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | toggled | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
set toggled(x)
{
if (this.states !== 2)
throw("Only used toggled when there are 2 states, otherwise, use state");
this.state = x;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | toggled | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
get visible()
{
return this._visible;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | visible | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
set visible(x)
{
if (this._visible === x)
return;
if (x)
this.element.removeStyleClass("hidden");
else
this.element.addStyleClass("hidden");
this._visible = x;
} | @extends {WebInspector.Object}
@constructor
@param {number=} states | visible | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StatusBarButton.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StatusBarButton.js | MIT |
function computedStyleCallback(computedStyle)
{
delete this._refreshUpdateInProgress;
if (this._lastNodeForInnerRefresh) {
delete this._lastNodeForInnerRefresh;
this._refreshUpdate(editedSection, forceFetchComputedStyle, userCallback);
ret... | @param {WebInspector.StylePropertiesSection=} editedSection
@param {boolean=} forceFetchComputedStyle
@param {function()=} userCallback | computedStyleCallback | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get inherited()
{
return this._inherited;
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | inherited | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
set inherited(x)
{
if (x === this._inherited)
return;
this._inherited = x;
this.updateState();
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | inherited | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get overloaded()
{
return this._overloaded;
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | overloaded | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
set overloaded(x)
{
if (x === this._overloaded)
return;
this._overloaded = x;
this.updateState();
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | overloaded | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get disabled()
{
return this.property.disabled;
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | disabled | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get name()
{
if (!this.disabled || !this.property.text)
return this.property.name;
var text = this.property.text;
var index = text.indexOf(":");
if (index < 1)
return this.property.name;
return text.substring(0, index).trim();
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | name | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get priority()
{
if (this.disabled)
return ""; // rely upon raw text to render it in the value field
return this.property.priority;
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | priority | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get value()
{
if (!this.disabled || !this.property.text)
return this.property.value;
var match = this.property.text.match(/(.*);\s*/);
if (!match || !match[1])
return this.property.value;
var text = match[1];
var index = text.indexOf(":");
if... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | value | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
get parsedOk()
{
return this.property.parsedOk;
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | parsedOk | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function processValue(regex, processor, nextProcessor, valueText)
{
var container = document.createDocumentFragment();
var items = valueText.replace(regex, "\0$1\0").split("\0");
for (var i = 0; i < items.length; ++i) {
if ((i % 2) === 0) ... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | processValue | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function linkifyURL(url)
{
var hrefUrl = url;
var match = hrefUrl.match(/['"]?([^'"]+)/);
if (match)
hrefUrl = match[1];
var container = document.createDocumentFragment();
container.appendChild(document.creat... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | linkifyURL | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function processColor(text)
{
try {
var color = new WebInspector.Color(text);
} catch (e) {
return document.createTextNode(text);
}
var format = getFormat();
var hasSpectrum = self._paren... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | processColor | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function spectrumChanged(e)
{
color = e.data;
var colorString = color.toString();
colorValueElement.textContent = colorString;
spectrum.displayText = colorString;
swatchInnerElement.style.backgroundColo... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | spectrumChanged | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function spectrumHidden()
{
scrollerElement.removeEventListener("scroll", repositionSpectrum, false);
self.applyStyleText(nameElement.textContent + ": " + valueElement.textContent, true, true, false);
spectrum.removeEventListener(WebInspector.S... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | spectrumHidden | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function repositionSpectrum()
{
spectrum.reposition(swatchElement);
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | repositionSpectrum | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function swatchClick(e)
{
// Shift + click toggles color formats.
// Click opens colorpicker, only if the element is not in computed styles section.
if (!spectrum || e.shiftKey)
changeColorDisplay(e);
... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | swatchClick | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function getFormat()
{
var format;
var formatSetting = WebInspector.settings.colorFormat.get();
if (formatSetting === cf.Original)
format = cf.Original;
else if (color.nickname)
... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | getFormat | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function nextFormat(curFormat)
{
// The format loop is as follows:
// * original
// * rgb(a)
// * hsl(a)
// * nickname (if the color has a nickname)
// * if the color is simple:
... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | nextFormat | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function changeColorDisplay(event)
{
do {
format = nextFormat(format);
var currentValue = color.toString(format || "");
} while (format && currentValue === color.value && format !== cf.Original);
... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | changeColorDisplay | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function callback(newStyle)
{
if (!newStyle)
return;
this.style = newStyle;
this._styleRule.style = newStyle;
if (this.treeOutline.section && this.treeOutline.section.pane)
this.treeOutline.section.pane.dispatchEventToListeners("s... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | callback | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function pasteHandler(context, event)
{
var data = event.clipboardData.getData("Text");
if (!data)
return;
var colonIdx = data.indexOf(":");
if (colonIdx < 0)
return;
var name = data.substring(0, colonIdx).trim();
... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | pasteHandler | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function blurListener(context, event)
{
var treeElement = this._parentPane._mouseDownTreeElement;
var moveDirection = "";
if (treeElement === this) {
if (isEditingName && this._parentPane._mouseDownTreeElementIsValue)
moveDirection = "forwa... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | blurListener | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function shouldCommitValueSemicolon(text, cursorPosition)
{
// FIXME: should this account for semicolons inside comments?
var openQuote = "";
for (var i = 0; i < cursorPosition; ++i) {
var ch = text[i];
if (ch === "\\" && openQuote !== "")
... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | shouldCommitValueSemicolon | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function apply()
{
var valueText = this.valueElement.textContent;
if (valueText.indexOf(";") === -1)
this.applyStyleText(this.nameElement.textContent + ": " + valueText, false, false, false);
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | apply | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function moveToNextCallback(alreadyNew, valueChanged, section)
{
if (!moveDirection)
return;
// User just tabbed through without changes.
if (moveTo && moveTo.parent) {
moveTo.startEditing(!isEditingName ? moveTo.nameElement : moveTo.valueElem... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | moveToNextCallback | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function userOperationFinishedCallback(parentPane, updateInterface)
{
if (updateInterface)
delete parentPane._userOperation;
} | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | userOperationFinishedCallback | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function callback(userCallback, originalPropertyText, newStyle)
{
if (!newStyle) {
if (updateInterface) {
// It did not apply, cancel editing.
this._revertStyleUponEditingCanceled(originalPropertyText);
}
userCal... | @constructor
@extends {TreeElement}
@param {?WebInspector.StylesSidebarPane} parentPane | callback | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/StylesSidebarPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/StylesSidebarPane.js | MIT |
function tabToTabId(tab) {
return tab.id;
} | @param {number} tabsCount
@return {Array.<string>} | tabToTabId | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TabbedPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TabbedPane.js | MIT |
get text()
{
return this._element.textContent;
} | Clients should never attach any event listeners to the |element|. Instead,
they should use the result of this method to attach listeners for bubbling events
or the |blurListener| parameter to register a "blur" event listener on the |element|
(since the "blur" event does not bubble.)
@param {Element} element
@param {fu... | text | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TextPrompt.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TextPrompt.js | MIT |
set text(x)
{
this._removeSuggestionAids();
if (!x) {
// Append a break element instead of setting textContent to make sure the selection is inside the prompt.
this._element.removeChildren();
this._element.appendChild(document.createElement("br"));
} else
... | Clients should never attach any event listeners to the |element|. Instead,
they should use the result of this method to attach listeners for bubbling events
or the |blurListener| parameter to register a "blur" event listener on the |element|
(since the "blur" event does not bubble.)
@param {Element} element
@param {fu... | text | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TextPrompt.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TextPrompt.js | MIT |
function moveBackIfOutside()
{
delete this._selectionTimeout;
if (!this.isCaretInsidePrompt() && window.getSelection().isCollapsed) {
this.moveCaretToEndOfPrompt();
this.autoCompleteSoon();
}
} | Clients should never attach any event listeners to the |element|. Instead,
they should use the result of this method to attach listeners for bubbling events
or the |blurListener| parameter to register a "blur" event listener on the |element|
(since the "blur" event does not bubble.)
@param {Element} element
@param {fu... | moveBackIfOutside | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TextPrompt.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TextPrompt.js | MIT |
get historyData()
{
// FIXME: do we need to copy this?
return this._data;
} | Whether to coalesce duplicate items in the history, default is true.
@type {boolean} | historyData | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TextPrompt.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TextPrompt.js | MIT |
function updateBoundaries(record)
{
this._overviewCalculator.updateBoundaries(record);
return false;
} | @constructor
@extends {WebInspector.Object}
@implements {WebInspector.TimelinePresentationModel.Filter} | updateBoundaries | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TimelineOverviewPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TimelineOverviewPane.js | MIT |
function markPercentagesForRecord(record)
{
if (!(this._showShortEvents || record.isLong()))
return;
var percentages = this._overviewCalculator.computeBarGraphPercentages(record);
var end = Math.round(percentages.end);
var categoryName = record.ca... | @constructor
@extends {WebInspector.Object}
@implements {WebInspector.TimelinePresentationModel.Filter} | markPercentagesForRecord | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/TimelineOverviewPane.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/TimelineOverviewPane.js | MIT |
function TreeElement(title, representedObject, hasChildren)
{
this._title = title;
this.representedObject = (representedObject || {});
this._hidden = false;
this._selectable = true;
this.expanded = false;
this.selected = false;
this.hasChildren = hasChildren;
this.children = [];
thi... | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | TreeElement | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get selectable() {
if (this._hidden)
return false;
return this._selectable;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | selectable | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
set selectable(x) {
this._selectable = x;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | selectable | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get listItemElement() {
return this._listItemNode;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | listItemElement | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get childrenListElement() {
return this._childrenListNode;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | childrenListElement | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get title() {
return this._title;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | title | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
set title(x) {
this._title = x;
this._setListItemNodeContent();
this.didChange();
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | title | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get tooltip() {
return this._tooltip;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | tooltip | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
set tooltip(x) {
this._tooltip = x;
if (this._listItemNode)
this._listItemNode.title = x ? x : "";
this.didChange();
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | tooltip | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get hasChildren() {
return this._hasChildren;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | hasChildren | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
set hasChildren(x) {
if (this._hasChildren === x)
return;
this._hasChildren = x;
if (!this._listItemNode)
return;
if (x)
this._listItemNode.classList.add("parent");
else {
this._listItemNode.classList.remove("parent");
... | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | hasChildren | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get hidden() {
return this._hidden;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | hidden | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
set hidden(x) {
if (this._hidden === x)
return;
this._hidden = x;
if (x) {
if (this._listItemNode)
this._listItemNode.classList.add("hidden");
if (this._childrenListNode)
this._childrenListNode.classList.add("hidden");
... | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | hidden | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
get shouldRefreshChildren() {
return this._shouldRefreshChildren;
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | shouldRefreshChildren | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
set shouldRefreshChildren(x) {
this._shouldRefreshChildren = x;
if (x && this.expanded)
this.expand();
} | @constructor
@param {Object=} representedObject
@param {boolean=} hasChildren | shouldRefreshChildren | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/treeoutline.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/treeoutline.js | MIT |
function getContent(element) {
if (element.tagName === "INPUT" && element.type === "text")
return element.value;
else
return element.textContent;
} | @param {Element} element
@param {WebInspector.EditingConfig=} config | getContent | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/UIUtils.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/UIUtils.js | MIT |
function windowLoaded()
{
window.addEventListener("focus", WebInspector._windowFocused, false);
window.addEventListener("blur", WebInspector._windowBlurred, false);
document.addEventListener("focus", WebInspector._focusChanged.bind(this), true);
window.removeEventListener("DOMContentLoaded", windowLoade... | @param {WebInspector.ContextMenu} contextMenu
@param {Node} contextNode
@param {Event} event | windowLoaded | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/UIUtils.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/UIUtils.js | MIT |
function AnchorBox(x, y, width, height)
{
this.x = x || 0;
this.y = y || 0;
this.width = width || 0;
this.height = height || 0;
} | @constructor
@param {number=} x
@param {number=} y
@param {number=} width
@param {number=} height | AnchorBox | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function highlightSearchResult(element, offset, length, domChanges)
{
var result = highlightSearchResults(element, [{offset: offset, length: length }], domChanges);
return result.length ? result[0] : null;
} | @param {Element} element
@param {number} offset
@param {number} length
@param {Array.<Object>=} domChanges | highlightSearchResult | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function highlightSearchResults(element, resultRanges, changes)
{
return highlightRangesWithStyleClass(element, resultRanges, "webkit-search-result", changes);
} | @param {Element} element
@param {Array.<Object>} resultRanges
@param {Array.<Object>=} changes | highlightSearchResults | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function highlightRangesWithStyleClass(element, resultRanges, styleClass, changes)
{
changes = changes || [];
var highlightNodes = [];
var lineText = element.textContent;
var ownerDocument = element.ownerDocument;
var textNodeSnapshot = ownerDocument.evaluate(".//text()", element, null, XPathResult.... | @param {Element} element
@param {Array.<Object>} resultRanges
@param {string} styleClass
@param {Array.<Object>=} changes | highlightRangesWithStyleClass | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function applyDomChanges(domChanges)
{
for (var i = 0, size = domChanges.length; i < size; ++i) {
var entry = domChanges[i];
switch (entry.type) {
case "added":
entry.parent.insertBefore(entry.node, entry.nextSibling);
break;
case "changed":
entry.... | @param {Element} element
@param {Array.<Object>} resultRanges
@param {string} styleClass
@param {Array.<Object>=} changes | applyDomChanges | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function revertDomChanges(domChanges)
{
for (var i = domChanges.length - 1; i >= 0; --i) {
var entry = domChanges[i];
switch (entry.type) {
case "added":
if (entry.node.parentElement)
entry.node.parentElement.removeChild(entry.node);
break;
cas... | @param {Element} element
@param {Array.<Object>} resultRanges
@param {string} styleClass
@param {Array.<Object>=} changes | revertDomChanges | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function createSearchRegex(query, caseSensitive, isRegex)
{
var regexFlags = caseSensitive ? "g" : "gi";
var regexObject;
if (isRegex) {
try {
regexObject = new RegExp(query, regexFlags);
} catch (e) {
// Silent catch.
}
}
if (!regexObject)
r... | @param {string} query
@param {boolean} caseSensitive
@param {boolean} isRegex
@return {RegExp} | createSearchRegex | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function createPlainTextSearchRegex(query, flags)
{
// This should be kept the same as the one in ContentSearchUtils.cpp.
var regexSpecialCharacters = "[](){}+-*.,?\\^$|";
var regex = "";
for (var i = 0; i < query.length; ++i) {
var c = query.charAt(i);
if (regexSpecialCharacters.indexOf... | @param {string} query
@param {string=} flags
@return {RegExp} | createPlainTextSearchRegex | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function countRegexMatches(regex, content)
{
var text = content;
var result = 0;
var match;
while (text && (match = regex.exec(text))) {
if (match[0].length > 0)
++result;
text = text.substring(match.index + 1);
}
return result;
} | @param {RegExp} regex
@param {string} content
@return {number} | countRegexMatches | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function numberToStringWithSpacesPadding(value, symbolsCount)
{
var numberString = value.toString();
var paddingLength = Math.max(0, symbolsCount - numberString.length);
var paddingString = Array(paddingLength + 1).join("\u00a0");
return paddingString + numberString;
} | @param {number} value
@param {number} symbolsCount
@return {string} | numberToStringWithSpacesPadding | javascript | node-pinus/pinus | tools/pinus-admin-web/public/front/utilities.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/front/utilities.js | MIT |
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
} | Based on JSON2 (http://www.JSON.org/js.html). | f | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function date(d, key) {
return isFinite(d.valueOf()) ?
d.getUTCFullYear() + '-' +
f(d.getUTCMonth() + 1) + '-' +
f(d.getUTCDate()) + 'T' +
f(d.getUTCHours()) + ':' +
f(d.getUTCMinutes()) + ':' +
f(d.getUTCSeconds()) + 'Z' : null;
} | Based on JSON2 (http://www.JSON.org/js.html). | date | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.... | Based on JSON2 (http://www.JSON.org/js.html). | quote | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON metho... | Based on JSON2 (http://www.JSON.org/js.html). | str | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.prototype.hasOwnPrope... | Based on JSON2 (http://www.JSON.org/js.html). | walk | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function Transport (socket, sessid) {
this.socket = socket;
this.sessid = sessid;
} | This is the transport template for all supported transport methods.
@constructor
@api public | Transport | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function Socket (options) {
this.options = {
port: 80
, secure: false
, document: 'document' in global ? document : false
, resource: 'socket.io'
, transports: io.transports
, 'connect timeout': 10000
, 'try multiple transports': true
, 'reconnect': true
, 're... | Create a new `Socket.IO client` which can establish a persistent
connection with a Socket.IO enabled server.
@api public | Socket | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function connect (transports){
if (self.transport) self.transport.clearTimeouts();
self.transport = self.getTransport(transports);
if (!self.transport) return self.publish('connect_failed');
// once the transport is ready
self.transport.ready(self, function () {
self.... | Connects to the server.
@param {Function} [fn] Callback.
@returns {io.Socket}
@api public | connect | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function SocketNamespace (socket, name) {
this.socket = socket;
this.name = name || '';
this.flags = {};
this.json = new Flag(this, 'json');
this.ackPackets = 0;
this.acks = {};
} | Socket namespace constructor.
@constructor
@api public | SocketNamespace | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function WS (socket) {
io.Transport.apply(this, arguments);
} | The WebSocket transport uses the HTML5 WebSocket API to establish an
persistent connection with the Socket.IO server. This transport will also
be inherited by the FlashSocket fallback as it provides a API compatible
polyfill for the WebSockets.
@constructor
@extends {io.Transport}
@api public | WS | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function Flashsocket () {
io.Transport.websocket.apply(this, arguments);
} | The FlashSocket transport. This is a API wrapper for the HTML5 WebSocket
specification. It uses a .swf file to communicate with the server. If you want
to serve the .swf file from a other server than where the Socket.IO script is
coming from you need to use the insecure version of the .swf. More information
about this ... | Flashsocket | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function init () {
var options = socket.options
, port = options['flash policy port']
, path = [
'http' + (options.secure ? 's' : '') + ':/'
, options.host + ':' + options.port
, options.resource
, 'static/flashsocket'
, 'WebSocketMain'... | The WebSocket fall back needs to append the flash container to the body
element, so we need to make sure we have access to it. Or defer the call
until we are sure there is a body element.
@param {Socket} socket The socket instance that needs a transport
@param {Function} fn The callback
@api private | init | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function stateChange () {
if (this.readyState == 4) {
this.onreadystatechange = empty;
self.posting = false;
if (this.status == 200){
self.socket.setBuffer(false);
} else {
self.onClose();
}
}
} | Posts a encoded message to the Socket.IO server.
@param {String} data A encoded message.
@api private | stateChange | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function onload () {
this.onload = empty;
self.socket.setBuffer(false);
} | Posts a encoded message to the Socket.IO server.
@param {String} data A encoded message.
@api private | onload | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function HTMLFile (socket) {
io.Transport.XHR.apply(this, arguments);
} | The HTMLFile transport creates a `forever iframe` based transport
for Internet Explorer. Regular forever iframe implementations will
continuously trigger the browsers buzy indicators. If the forever iframe
is created inside a `htmlfile` these indicators will not be trigged.
@constructor
@extends {io.Transport.XHR}
@a... | HTMLFile | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function XHRPolling () {
io.Transport.XHR.apply(this, arguments);
} | The XHR-polling transport uses long polling XHR requests to create a
"persistent" connection with the server.
@constructor
@api public | XHRPolling | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function stateChange () {
if (this.readyState == 4) {
this.onreadystatechange = empty;
if (this.status == 200) {
self.onData(this.responseText);
self.get();
} else {
self.onClose();
}
}
} | Starts a XHR request to wait for incoming messages.
@api private | stateChange | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
function onload () {
this.onload = empty;
self.onData(this.responseText);
self.get();
} | Starts a XHR request to wait for incoming messages.
@api private | onload | javascript | node-pinus/pinus | tools/pinus-admin-web/public/js/socket.io.js | https://github.com/node-pinus/pinus/blob/master/tools/pinus-admin-web/public/js/socket.io.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.