From d4108e29bbfea13949005a79dfbd6533e006b9af Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Mon, 21 Apr 2014 15:27:54 -0400 Subject: [PATCH 1/7] Bug #6633 - No longer force the height of shared-area. (Note: none of the current views were affected by this, and as the comment states: it was already deprecated). --- documentation/classes/NativeClass.Array.html | 6 +- documentation/classes/NativeClass.String.html | 14 +- documentation/classes/Visualizer.Module.html | 18 +-- .../Visualizer.ModuleView.ResizableMixin.html | 8 +- .../classes/Visualizer.ModuleView.html | 38 ++--- documentation/classes/Visualizer.Utils.html | 26 ++-- documentation/classes/Visualizer.World.html | 87 +---------- documentation/classes/jQuery.fn.html | 2 +- documentation/data.json | 137 ++++++++---------- .../files/build_js_j-visualizer.js.html | 15 +- src/vis_world.js.coffee | 14 -- 11 files changed, 119 insertions(+), 246 deletions(-) diff --git a/documentation/classes/NativeClass.Array.html b/documentation/classes/NativeClass.Array.html index 77f6ca3..c68beb3 100644 --- a/documentation/classes/NativeClass.Array.html +++ b/documentation/classes/NativeClass.Array.html @@ -228,7 +228,7 @@

removeInstancesOf

- build/js/j-visualizer.js:904 + build/js/j-visualizer.js:891

@@ -325,7 +325,7 @@

shuffleVals

- build/js/j-visualizer.js:928 + build/js/j-visualizer.js:915

@@ -400,7 +400,7 @@

values

- build/js/j-visualizer.js:958 + build/js/j-visualizer.js:945

diff --git a/documentation/classes/NativeClass.String.html b/documentation/classes/NativeClass.String.html index b498654..f2cdbf3 100644 --- a/documentation/classes/NativeClass.String.html +++ b/documentation/classes/NativeClass.String.html @@ -262,7 +262,7 @@

advancedIndexOf

- build/js/j-visualizer.js:1042 + build/js/j-visualizer.js:1029

@@ -394,7 +394,7 @@

beginsWith

- build/js/j-visualizer.js:1089 + build/js/j-visualizer.js:1076

@@ -520,7 +520,7 @@

capitalizeLetter

- build/js/j-visualizer.js:1109 + build/js/j-visualizer.js:1096

@@ -636,7 +636,7 @@

includes

- build/js/j-visualizer.js:1069 + build/js/j-visualizer.js:1056

@@ -752,7 +752,7 @@

removeInitialUnderscore

- build/js/j-visualizer.js:1147 + build/js/j-visualizer.js:1134

@@ -825,7 +825,7 @@

titleize

- build/js/j-visualizer.js:1131 + build/js/j-visualizer.js:1118

@@ -914,7 +914,7 @@

truncateTo

- build/js/j-visualizer.js:1013 + build/js/j-visualizer.js:1000

diff --git a/documentation/classes/Visualizer.Module.html b/documentation/classes/Visualizer.Module.html index 7c38bec..96d7804 100644 --- a/documentation/classes/Visualizer.Module.html +++ b/documentation/classes/Visualizer.Module.html @@ -114,7 +114,7 @@

Visualizer.Module Class

- Defined in: build/js/j-visualizer.js:1482 + Defined in: build/js/j-visualizer.js:1469
@@ -287,7 +287,7 @@

_groupedBy

- build/js/j-visualizer.js:1638 + build/js/j-visualizer.js:1625

@@ -398,7 +398,7 @@

forceLimit

- build/js/j-visualizer.js:1584 + build/js/j-visualizer.js:1571

@@ -506,7 +506,7 @@

groupedBy

- build/js/j-visualizer.js:1606 + build/js/j-visualizer.js:1593

@@ -605,7 +605,7 @@

content

- build/js/j-visualizer.js:1520 + build/js/j-visualizer.js:1507

@@ -656,7 +656,7 @@

dataset

- build/js/j-visualizer.js:1538 + build/js/j-visualizer.js:1525

@@ -705,7 +705,7 @@

maxLength

- build/js/j-visualizer.js:1508 + build/js/j-visualizer.js:1495

@@ -753,7 +753,7 @@

moduleViews

- build/js/j-visualizer.js:1553 + build/js/j-visualizer.js:1540

@@ -801,7 +801,7 @@

visualizer

- build/js/j-visualizer.js:1499 + build/js/j-visualizer.js:1486

diff --git a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html index eb8a342..b047a18 100644 --- a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html +++ b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html @@ -114,7 +114,7 @@

Visualizer.ModuleView.ResizableMixin Class

- Defined in: build/js/j-visualizer.js:2007 + Defined in: build/js/j-visualizer.js:1994
@@ -261,7 +261,7 @@

_tryUpdateValue

- build/js/j-visualizer.js:2079 + build/js/j-visualizer.js:2066

@@ -427,7 +427,7 @@

_updateSize

- build/js/j-visualizer.js:2042 + build/js/j-visualizer.js:2029

@@ -541,7 +541,7 @@

run

- build/js/j-visualizer.js:2023 + build/js/j-visualizer.js:2010

diff --git a/documentation/classes/Visualizer.ModuleView.html b/documentation/classes/Visualizer.ModuleView.html index 265396e..1bc35ef 100644 --- a/documentation/classes/Visualizer.ModuleView.html +++ b/documentation/classes/Visualizer.ModuleView.html @@ -114,7 +114,7 @@

Visualizer.ModuleView Class

- Defined in: build/js/j-visualizer.js:1666 + Defined in: build/js/j-visualizer.js:1653
@@ -356,7 +356,7 @@

$container

- build/js/j-visualizer.js:1858 + build/js/j-visualizer.js:1845

@@ -465,7 +465,7 @@

_presetContainerAttrs

- build/js/j-visualizer.js:1976 + build/js/j-visualizer.js:1963

@@ -584,7 +584,7 @@

_updateDimension

- build/js/j-visualizer.js:1947 + build/js/j-visualizer.js:1934

@@ -705,7 +705,7 @@

clear

- build/js/j-visualizer.js:1780 + build/js/j-visualizer.js:1767

@@ -784,7 +784,7 @@

destroy

- build/js/j-visualizer.js:1799 + build/js/j-visualizer.js:1786

@@ -859,7 +859,7 @@

hardReset

- build/js/j-visualizer.js:1875 + build/js/j-visualizer.js:1862

@@ -950,7 +950,7 @@

height

- build/js/j-visualizer.js:1933 + build/js/j-visualizer.js:1920

@@ -1081,7 +1081,7 @@

run

- build/js/j-visualizer.js:1815 + build/js/j-visualizer.js:1802

@@ -1208,7 +1208,7 @@

updateSelector

- build/js/j-visualizer.js:1840 + build/js/j-visualizer.js:1827

@@ -1315,7 +1315,7 @@

widgetParamedOutlineCSS

- build/js/j-visualizer.js:1889 + build/js/j-visualizer.js:1876

@@ -1436,7 +1436,7 @@

width

- build/js/j-visualizer.js:1919 + build/js/j-visualizer.js:1906

@@ -1546,7 +1546,7 @@

arrangedContent

- build/js/j-visualizer.js:1739 + build/js/j-visualizer.js:1726

@@ -1595,7 +1595,7 @@

containerSelector

- build/js/j-visualizer.js:1690 + build/js/j-visualizer.js:1677

@@ -1647,7 +1647,7 @@

data

- build/js/j-visualizer.js:1730 + build/js/j-visualizer.js:1717

@@ -1692,7 +1692,7 @@

dimensionsDidChange

- build/js/j-visualizer.js:1753 + build/js/j-visualizer.js:1740

@@ -1741,7 +1741,7 @@

module

- build/js/j-visualizer.js:1681 + build/js/j-visualizer.js:1668

@@ -1786,7 +1786,7 @@

previousSelectors

- build/js/j-visualizer.js:1708 + build/js/j-visualizer.js:1695

@@ -1833,7 +1833,7 @@

visualizer

- build/js/j-visualizer.js:1721 + build/js/j-visualizer.js:1708

diff --git a/documentation/classes/Visualizer.Utils.html b/documentation/classes/Visualizer.Utils.html index 4762fa1..afaee42 100644 --- a/documentation/classes/Visualizer.Utils.html +++ b/documentation/classes/Visualizer.Utils.html @@ -110,7 +110,7 @@

Visualizer.Utils Class

- Defined in: build/js/j-visualizer.js:1163 + Defined in: build/js/j-visualizer.js:1150
@@ -311,7 +311,7 @@

boundedVal

- build/js/j-visualizer.js:1251 + build/js/j-visualizer.js:1238

@@ -454,7 +454,7 @@

cloneArray

- build/js/j-visualizer.js:1397 + build/js/j-visualizer.js:1384

@@ -563,7 +563,7 @@

existsWithValue

- build/js/j-visualizer.js:1176 + build/js/j-visualizer.js:1163

@@ -676,7 +676,7 @@

intersectionCount

- build/js/j-visualizer.js:1366 + build/js/j-visualizer.js:1353

@@ -811,7 +811,7 @@

intersectionSafe

- build/js/j-visualizer.js:1333 + build/js/j-visualizer.js:1320

@@ -939,7 +939,7 @@

isArray

- build/js/j-visualizer.js:1302 + build/js/j-visualizer.js:1289

@@ -1052,7 +1052,7 @@

maxVal

- build/js/j-visualizer.js:1235 + build/js/j-visualizer.js:1222

@@ -1181,7 +1181,7 @@

minVal

- build/js/j-visualizer.js:1219 + build/js/j-visualizer.js:1206

@@ -1310,7 +1310,7 @@

randBetween

- build/js/j-visualizer.js:1272 + build/js/j-visualizer.js:1259

@@ -1441,7 +1441,7 @@

randIntBetween

- build/js/j-visualizer.js:1290 + build/js/j-visualizer.js:1277

@@ -1570,7 +1570,7 @@

relativeSizeString

- build/js/j-visualizer.js:1313 + build/js/j-visualizer.js:1300

@@ -1713,7 +1713,7 @@

waitForRepeatingEvents

- build/js/j-visualizer.js:1187 + build/js/j-visualizer.js:1174

diff --git a/documentation/classes/Visualizer.World.html b/documentation/classes/Visualizer.World.html index b440f1a..cb2a871 100644 --- a/documentation/classes/Visualizer.World.html +++ b/documentation/classes/Visualizer.World.html @@ -201,15 +201,6 @@

Methods

-
  • - resizeSharedArea - - - - deprecated - -
  • - @@ -539,7 +530,7 @@

    _handlePhasedButtonClick

    - build/js/j-visualizer.js:878 + build/js/j-visualizer.js:865

    @@ -709,82 +700,6 @@

    resize

    -
    -

    Returns:

    - -
    - - - Void: - - -
    -
    - - - - - - -
    -

    resizeSharedArea

    - - - () - - - - - Void - - - - - deprecated - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - build/js/j-visualizer.js:863 - -

    - - - -

    Deprecated: @todo: remove this - this should be the work of ModuleViews...

    - - - -
    - -
    -

    resizeSharedArea updates the height of the "shared area" DOM element -within the Visualizer World.

    - -
    - - - -

    Returns:

    diff --git a/documentation/classes/jQuery.fn.html b/documentation/classes/jQuery.fn.html index ed43ab2..a985d16 100644 --- a/documentation/classes/jQuery.fn.html +++ b/documentation/classes/jQuery.fn.html @@ -220,7 +220,7 @@

    addExpiringClass

    - build/js/j-visualizer.js:980 + build/js/j-visualizer.js:967

    diff --git a/documentation/data.json b/documentation/data.json index 442a828..462e28d 100644 --- a/documentation/data.json +++ b/documentation/data.json @@ -136,7 +136,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1163, + "line": 1150, "description": "Visualizer Utils\nA collection of common utility functions used in the Visualizer." }, "Visualizer.Module": { @@ -149,7 +149,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1482, + "line": 1469, "description": "Visualizer Module\nA Visualizer Module is a collection of data used for Visualization.\nIt keeps access slightly standardized and offers several helpers to\nsimplify data management.\n\nEach Module also has a collection of relevant ModuleViews - Objects that\ndefine and take care of how a given Module's data can be displayed.", "extends": "Ember.ArrayController" }, @@ -163,7 +163,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1666, + "line": 1653, "description": "Visualizer ModuleView\nModule Views encapsulate the functionality for drawing,\ncoloring, and handling events on visualizations of the data\nprovided by a Module. These are the \"visual\" side of\ndata visualizations.", "extends": "Ember.Object" }, @@ -179,7 +179,7 @@ ], "namespace": "Visualizer.ModuleView", "file": "build/js/j-visualizer.js", - "line": 2007, + "line": 1994, "description": "ResizableMixin\nA helper mixin for ModuleViews which can have their size set manually.\nThis simplifies specifying size, padding, and position of a ModuleView\nviewport container, and allows values to be set either relatively\n(as a percentage of the Visualizer's World), or explicitly (e.g. \"50px\" or 50)", "extends": "Ember.Mixin" } @@ -863,22 +863,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 863, - "description": "resizeSharedArea updates the height of the \"shared area\" DOM element\nwithin the Visualizer World.", - "deprecated": true, - "deprecationMessage": "@todo: remove this - this should be the work of ModuleViews...", - "itemtype": "method", - "name": "resizeSharedArea", - "return": { - "description": "", - "type": "Void" - }, - "class": "Visualizer.World", - "namespace": "Visualizer" - }, - { - "file": "build/js/j-visualizer.js", - "line": 878, + "line": 865, "description": "_handlePhasedButtonClick is called when an element with class phasedButton\nis clicked. Adds a class 'disabledItem' to the element for 2 seconds;\nif the element is clicked again before the class 'disabledItem' class expires,\nthe click will be ignored.", "itemtype": "method", "name": "_handlePhasedButtonClick", @@ -893,7 +878,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 904, + "line": 891, "description": "removeInstancesOf removes traces of a provided value from an Array", "itemtype": "method", "name": "removeInstancesOf", @@ -912,7 +897,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 928, + "line": 915, "description": "shuffleVals - Fisher-Yates algorithm for shuffling arrays\nin-place. (Essentially goes through each slot in array and\nswitches its value with one from a random slot...)", "itemtype": "method", "name": "shuffleVals", @@ -925,7 +910,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 958, + "line": 945, "description": "values takes an Object and returns its values\n(similar to `.keys()`)", "itemtype": "method", "name": "values", @@ -938,7 +923,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 980, + "line": 967, "description": "addExpiringClass adds a temporary class to a JQuery object.\nThe class has an expiry, after which it is removed.", "itemtype": "method", "name": "addExpiringClass", @@ -967,7 +952,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1013, + "line": 1000, "description": "truncateTo ensures a string is no longer than a given size limit.\n(In the case that it is longer, a suffix can be given for truncation)", "itemtype": "method", "name": "truncateTo", @@ -994,7 +979,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1042, + "line": 1029, "description": "advancedIndexOf searches the object String for a parameter\nsubstring, allows additional options (such as case-insensitivity).", "itemtype": "method", "name": "advancedIndexOf", @@ -1020,7 +1005,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1069, + "line": 1056, "description": "includes searches the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "includes", @@ -1047,7 +1032,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1089, + "line": 1076, "description": "beginsWith searches the start of the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "beginsWith", @@ -1074,7 +1059,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1109, + "line": 1096, "description": "capitalizeLetter is a String capitalize function adapted from\nhttp://stackoverflow.com/a/3291856/624590 .\nCapitalizes the letter at position n of the object String.", "itemtype": "method", "name": "capitalizeLetter", @@ -1096,7 +1081,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1131, + "line": 1118, "description": "titleize creates a title-formatted copy of a String", "itemtype": "method", "name": "titleize", @@ -1109,7 +1094,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1147, + "line": 1134, "description": "removeInitialUnderscore removes the first leading underscore from a String", "itemtype": "method", "name": "removeInitialUnderscore", @@ -1122,7 +1107,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1176, + "line": 1163, "description": "existsWithValue checks if a values isn't null/undefined", "itemtype": "method", "name": "existsWithValue", @@ -1142,7 +1127,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1187, + "line": 1174, "description": "waitForRepeatingEvents is a debounce-like function for preventing\nmultiple execution. It should be called with a function and an\namount of time to wait. It can also be provided a timer name so as\nto namespace the blocked items. It can also be called with an Object\ntimer set to allow different objects to not prevent the execution of\nfunctions in others.", "itemtype": "method", "name": "waitForRepeatingEvents", @@ -1177,7 +1162,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1219, + "line": 1206, "description": "minVal takes two parameters, returns the smaller", "itemtype": "method", "name": "minVal", @@ -1202,7 +1187,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1235, + "line": 1222, "description": "maxVal takes two parameters, returns the larger", "itemtype": "method", "name": "maxVal", @@ -1227,7 +1212,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1251, + "line": 1238, "description": "boundedVal takes three parameters: an item, the lower bound,\nand the upper bound. If the item is between the bounds,\nthe item is returned, otherwise the failed bound is returned.", "itemtype": "method", "name": "boundedVal", @@ -1257,7 +1242,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1272, + "line": 1259, "description": "randBetween provides a random number between two values.", "itemtype": "method", "name": "randBetween", @@ -1286,7 +1271,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1290, + "line": 1277, "description": "randIntBetween provides a random (rounded) Integer between two values.", "itemtype": "method", "name": "randIntBetween", @@ -1311,7 +1296,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1302, + "line": 1289, "description": "isArray returns a flag of whether the parameter is of type Array", "itemtype": "method", "name": "isArray", @@ -1331,7 +1316,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1313, + "line": 1300, "description": "relativeSizeString parses an input size for either an explicit\nvalue, or a value in relationship to some parent value.\nE.g. \"50%\" of 900 = 450, \"50\" = 50, \"50px\" = 50", "itemtype": "method", "name": "relativeSizeString", @@ -1356,7 +1341,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1333, + "line": 1320, "description": "intersectionSafe is simple intersection code, iterates along two\nsorted arrays incrementing the index of the smaller value\n(if values are equal, it is part of intersection, and so store position and iterate both).\nReturns array of indices of intersecting values with respect to the first array passed.\n\nintersectionSafe is modified from code found on StackOverflow at:\nhttp://stackoverflow.com/a/1885660/624590", "itemtype": "method", "name": "intersectionSafe", @@ -1381,7 +1366,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1366, + "line": 1353, "description": "intersectionCount is a modified form of intersectionSafe that simply\nincrements a counter instead of building an intersection Array.\n(Faster because increments rather than pushing values to array,\nalso more memory efficient; JSPerf suggests 100% performance increase\n- beneficial for large datasets...)", "itemtype": "method", "name": "intersectionCount", @@ -1406,7 +1391,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1397, + "line": 1384, "description": "cloneArray creates a copy of an Array.", "deprecated": true, "deprecationMessage": "use Array.copy instead.", @@ -1428,7 +1413,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1499, + "line": 1486, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1439,7 +1424,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1508, + "line": 1495, "description": "maxLength is an integer size of how much data should be displayed.\nSometimes a project will collect more data than is practical to display\nto the user (either because it will be confusing, or otherwise too slow);\nthis property represents that limit.", "itemtype": "property", "name": "maxLength", @@ -1450,7 +1435,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1520, + "line": 1507, "description": "content is the full set of data (in Array , Ember.Array) form that is\navailable to this Module.\n\nNote: this attribute should only be accessed from the\ndata-management side of your app; it's where you dump data, and it's\nwhat you generally access for front-end filtering. This Module's\nModuleViews should not access the content, however - they should access\nthe dataset (which is a subset of content).", "itemtype": "property", "name": "content", @@ -1461,7 +1446,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1538, + "line": 1525, "description": "dataset is the subset of content used for current visualization.\nIt can potentially be the exact same data as content, in full,\nbut it can also be a limited/truncated version (often using the\nmaxLength property). It may also filtered down by properties, etc.\n\nModuleViews should only look here for their Module data.", "itemtype": "property", "name": "dataset", @@ -1472,7 +1457,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1553, + "line": 1540, "description": "moduleViews an object dictionary/map of Visualizer ModuleView objects,\neach of which must be relevant to this particular Module's data structuring.\n\nFor example, if this Module is a set of words with frequencies, a WordCloud\nmay be an applicable ModuleView.", "itemtype": "property", "name": "moduleViews", @@ -1483,7 +1468,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1568, + "line": 1555, "description": "init is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", "is_constructor": 1, "class": "Visualizer.Module", @@ -1491,7 +1476,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1584, + "line": 1571, "description": "forceLimit sorts the current data by a provided key, and selects only the\nfirst maxLength (property) items for this Module's dataset, ensuring that\nthe limit to the viewed-data's size is enforced.", "todo": [ "consider implementing a n-item max-heap data structure instead of sorting" @@ -1516,7 +1501,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1606, + "line": 1593, "description": "groupedBy creates a cached property on the Module to retrieve its data\nin the form of a two-dimensional Array, where the sub arrays contain\nthis Module's dataset split into sets that share a common (passed) property.\n\nThe outside Array is sorted by length, so the largest groups are at the start.\n\nSince the result is cached, it will only be recomputed when the dataset changes,\nkeeping this efficient. The first time you use groupBy for any given property\nafter the data changes (or is created) runs O(nlogn), but each subsequent access\nis simply O(1) as it simply grabs the previous data. Say what??? :P", "itemtype": "method", "name": "groupedBy", @@ -1536,7 +1521,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1638, + "line": 1625, "description": "_groupedBy groups the Module's dataset by a given property, returning\nan unsorted, two-dimensional array.\n\nThis method should not be called explicitly, instead developers should\ngo through the `groupedBy` method (no leading underscore), which\ncaches the groups (making redraws far more efficient)", "itemtype": "method", "name": "_groupedBy", @@ -1556,7 +1541,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1681, + "line": 1668, "description": "module is a reference to the parent Module for this ModuleView instance.", "itemtype": "property", "name": "module", @@ -1567,7 +1552,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1690, + "line": 1677, "description": "containerSelector is a string CSS selector used for finding\nthis ModuleView's window in a Visualization.\n\nOften unique, but occasionally multiple ModuleViews will be\nwritten to share a container.\n\nOften this property will be specified in a widget's parameters,\notherwise child classes to ModuleView should specify defaults.\nIf a widget does specify a `container` param, it will be set and used\nrunning any operation.", "itemtype": "property", "name": "containerSelector", @@ -1578,7 +1563,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1708, + "line": 1695, "description": "previousSelectors is a list history of selectors that were\npreviously set as this instance of a ModuleView's containerSelector.\n\nThis may be useful for navigation, or for cleaning up after a visualization.", "itemtype": "property", "name": "previousSelectors", @@ -1588,7 +1573,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1721, + "line": 1708, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1599,7 +1584,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1730, + "line": 1717, "description": "data is a reference to the visible data for visualization.", "itemtype": "property", "name": "data", @@ -1610,7 +1595,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1739, + "line": 1726, "description": "arrangedContent is a reference to all Module data (sorted/arranged).\nThis property should only seldom be accessed because it includes\ndata which is deemed irrelevant by the Module (filtered, etc.)\n\nIt may, however, be useful if a View decides to animate old data away\nupon filtering / limiting its viewable data.", "itemtype": "property", "name": "arrangedContent", @@ -1621,7 +1606,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1753, + "line": 1740, "description": "dimensionsDidChange is a flag used by ModuleViews to decide how much\nprocessing is required when they run an operation.\n\nIf all dimensions, including visible data, width, and height, are\nunchanged, often times the old Visualization can simply be shown.\n\nSet to true by default, so that ModuleViews can have a proper first-draw.", "itemtype": "property", "name": "dimensionsDidChange", @@ -1631,7 +1616,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1767, + "line": 1754, "description": "init is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", "is_constructor": 1, "class": "Visualizer.ModuleView", @@ -1639,7 +1624,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1780, + "line": 1767, "description": "clear cleanses/hides the current ModuleView from the visualization.\n\nThis method is often called when a widget representing the ModuleView\nleaves a visualization (either being removed from a scene,\nor not being part of a new scene.)\n\nEach ModuleView should implement/override this, and should\nprovide (at least) the following functionality:\n - hide the container/elements (to prevent overlap/event-disruption),\n - unset isDrawn so that next time we know to fully redraw, etc.\n\nOptionally, it should also empty the DOM Node/SVG to save memory", "itemtype": "method", "name": "clear", @@ -1652,7 +1637,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1799, + "line": 1786, "description": "destroy totally removes the current ModuleView from the visualization.\nThis should entirely empty and remove any DOM-or-SVG Elements from the\ndocument.\n\nThis method is rarely called unless the Visualizer is being removed entirely.\n\nEach ModuleView should implement/override this function.", "itemtype": "method", "name": "destroy", @@ -1665,7 +1650,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1815, + "line": 1802, "description": "run is used used to execute a widget's operation on a ModuleView.\nMany times additional parameters are passed, these assist in updating a\nModuleView by providing the widget's specifications (container, width,\nany data limitations, etc.)\n\nIf params includes a `container` key, its value will be used to define\nthis particular ModuleView's container viewport.", "itemtype": "method", "name": "run", @@ -1691,7 +1676,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1840, + "line": 1827, "description": "updateSelector takes a new containerSelector parameter, and uses it to\nchange this ModuleView's viewport. It also updates the `previousSelectors`\nhistory to contain the selector that was used before this method was called.", "itemtype": "method", "name": "updateSelector", @@ -1711,7 +1696,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1858, + "line": 1845, "description": "$container is a method which returns the ModuleView's container/viewport\nJQuery Object.\n\nIf a parameter is passed, $container will attempt to find that parameter\nwithing the structure of its container object.", "itemtype": "method", "name": "$container", @@ -1732,7 +1717,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1875, + "line": 1862, "description": "hardReset clears out the ModuleView and tells it that dimensionsDidChange,\nso the next redraw/execution is a fresh one (fully recalculated).\n\nThis is automatically called when the ModuleView's data changes.", "itemtype": "method", "name": "hardReset", @@ -1745,7 +1730,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1889, + "line": 1876, "description": "widgetParamedOutlineCSS provides an Object where keys/values map to CSS attributes\nrelevant to the container ONLY for manually specified dimensions/positions.\n\nThe point of this method is to provide access to data that can be used to set the\nstyle of the DOM element containing this ModuleView to the manually-set specifications.\n\nIf a developer opts to simply use a container's size/position, this will return an\nempty object.", "itemtype": "method", "name": "widgetParamedOutlineCSS", @@ -1766,7 +1751,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1919, + "line": 1906, "description": "width getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "width", @@ -1793,7 +1778,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1933, + "line": 1920, "description": "height getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "height", @@ -1820,7 +1805,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1947, + "line": 1934, "description": "_updateDimension is used when setting width or height.\nIt accepts a key (which should be set to \"width\" or \"height\"),\nand a value.\n\nThe value is rounded down to the nearest integer to keep the DOM clean,\nand to keep determining changes simple.\n\nIf the value isn't the same as this ModuleView's previous value for the\nsame key property, dimensionsDidChange flag will be set true so that the\nModuleView knows to perform its next operation with full calculations.", "itemtype": "method", "name": "_updateDimension", @@ -1847,7 +1832,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1976, + "line": 1963, "description": "_presetContainerAttrs is used when running an operation to ensure that\nrequired attributes based on the viewport (such as available width/height)\nfor visualization are set.\n\nIf width or height are manually specified, this will not update that attribute -\nin these cases, the ModuleView should know how to handle explicit dimensions.\nThe \"resizable mixin\" can help with this (more details in _resizable_mixin file)", "itemtype": "method", "name": "_presetContainerAttrs", @@ -1868,7 +1853,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2023, + "line": 2010, "description": "run hijacks the ModuleView's run method to first attempt to update\nthe viewport's size based on the parameter specifications.\nAfter attempting to update the size/position of the viewport,\nthe ModuleView's run function is allowed to proceed.", "itemtype": "method", "name": "run", @@ -1894,7 +1879,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2042, + "line": 2029, "description": "_updateSize scans the widget-sent params for manually-set\nsize/position values, uses these to set up the ModuleView's\nrelevant attributes.", "itemtype": "method", "name": "_updateSize", @@ -1917,7 +1902,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2079, + "line": 2066, "description": "_tryUpdateValue given a sizing/position-defining key and value,\nthis method attempts to parse the value and, if it's a relative\npercentage or String, coerce it to an integer.\n\nAllows values to be explicit (e.g. 50, or \"50px\"), or relative\nto the Visualizer's World (e.g. \"50%\"). Parameter relativeReq is\nused to specify which of the World's parameters should be used to\ndetermine a relative size (e.g. \"left\" uses the World's \"width\").\n\nparams may also specify an amount of padding.", "itemtype": "method", "name": "_tryUpdateValue", @@ -1971,11 +1956,11 @@ }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", - "line": " build/js/j-visualizer.js:1568" + "line": " build/js/j-visualizer.js:1555" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", - "line": " build/js/j-visualizer.js:1767" + "line": " build/js/j-visualizer.js:1754" } ] } \ No newline at end of file diff --git a/documentation/files/build_js_j-visualizer.js.html b/documentation/files/build_js_j-visualizer.js.html index 4b8bb24..4a7754a 100644 --- a/documentation/files/build_js_j-visualizer.js.html +++ b/documentation/files/build_js_j-visualizer.js.html @@ -966,20 +966,7 @@

    File: build/js/j-visualizer.js

    */ injectDefaultWorld: function() { return this.$().empty().append($(defaultWorldTemplate)); - }, - - /** - * resizeSharedArea updates the height of the "shared area" DOM element - * within the Visualizer World. - * - * @deprecated @todo: remove this - this should be the work of ModuleViews... - * - * @method resizeSharedArea - * @return {void} - */ - resizeSharedArea: (function() { - return this.$("#shared-area").css('height', "" + (this.get('height')) + "px"); - }).observes('height') + } }); diff --git a/src/vis_world.js.coffee b/src/vis_world.js.coffee index b73d504..78aadfa 100644 --- a/src/vis_world.js.coffee +++ b/src/vis_world.js.coffee @@ -93,20 +93,6 @@ injectDefaultWorld: ()-> @$().empty().append $(defaultWorldTemplate) - ###* - # resizeSharedArea updates the height of the "shared area" DOM element - # within the Visualizer World. - # - # @deprecated @todo: remove this - this should be the work of ModuleViews... - # - # @method resizeSharedArea - # @return {void} - ### - resizeSharedArea: ( ()-> - @$("#shared-area").css('height', "#{@get('height')}px") - ).observes('height') - - ###* # _handlePhasedButtonClick is called when an element with class phasedButton # is clicked. Adds a class 'disabledItem' to the element for 2 seconds; From 7e3e5eafa237a90eff1409f6d21bfced700b7ac6 Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Wed, 23 Apr 2014 16:35:53 -0400 Subject: [PATCH 2/7] Add deprecation warning to Visualizer World injectDefaultWorld function --- documentation/classes/NativeClass.Array.html | 6 +- documentation/classes/NativeClass.String.html | 14 +- documentation/classes/Visualizer.Module.html | 18 +-- .../Visualizer.ModuleView.ResizableMixin.html | 8 +- .../classes/Visualizer.ModuleView.html | 38 +++--- documentation/classes/Visualizer.Utils.html | 26 ++-- documentation/classes/Visualizer.World.html | 2 +- documentation/classes/jQuery.fn.html | 2 +- documentation/data.json | 122 +++++++++--------- .../files/build_js_j-visualizer.js.html | 7 +- src/vis_world.js.coffee | 3 +- 11 files changed, 126 insertions(+), 120 deletions(-) diff --git a/documentation/classes/NativeClass.Array.html b/documentation/classes/NativeClass.Array.html index c68beb3..d7ad952 100644 --- a/documentation/classes/NativeClass.Array.html +++ b/documentation/classes/NativeClass.Array.html @@ -228,7 +228,7 @@

    removeInstancesOf

    - build/js/j-visualizer.js:891 + build/js/j-visualizer.js:896

    @@ -325,7 +325,7 @@

    shuffleVals

    - build/js/j-visualizer.js:915 + build/js/j-visualizer.js:920

    @@ -400,7 +400,7 @@

    values

    - build/js/j-visualizer.js:945 + build/js/j-visualizer.js:950

    diff --git a/documentation/classes/NativeClass.String.html b/documentation/classes/NativeClass.String.html index f2cdbf3..9fed922 100644 --- a/documentation/classes/NativeClass.String.html +++ b/documentation/classes/NativeClass.String.html @@ -262,7 +262,7 @@

    advancedIndexOf

    - build/js/j-visualizer.js:1029 + build/js/j-visualizer.js:1034

    @@ -394,7 +394,7 @@

    beginsWith

    - build/js/j-visualizer.js:1076 + build/js/j-visualizer.js:1081

    @@ -520,7 +520,7 @@

    capitalizeLetter

    - build/js/j-visualizer.js:1096 + build/js/j-visualizer.js:1101

    @@ -636,7 +636,7 @@

    includes

    - build/js/j-visualizer.js:1056 + build/js/j-visualizer.js:1061

    @@ -752,7 +752,7 @@

    removeInitialUnderscore

    - build/js/j-visualizer.js:1134 + build/js/j-visualizer.js:1139

    @@ -825,7 +825,7 @@

    titleize

    - build/js/j-visualizer.js:1118 + build/js/j-visualizer.js:1123

    @@ -914,7 +914,7 @@

    truncateTo

    - build/js/j-visualizer.js:1000 + build/js/j-visualizer.js:1005

    diff --git a/documentation/classes/Visualizer.Module.html b/documentation/classes/Visualizer.Module.html index 96d7804..b47b872 100644 --- a/documentation/classes/Visualizer.Module.html +++ b/documentation/classes/Visualizer.Module.html @@ -114,7 +114,7 @@

    Visualizer.Module Class

    @@ -287,7 +287,7 @@

    _groupedBy

    - build/js/j-visualizer.js:1625 + build/js/j-visualizer.js:1630

    @@ -398,7 +398,7 @@

    forceLimit

    - build/js/j-visualizer.js:1571 + build/js/j-visualizer.js:1576

    @@ -506,7 +506,7 @@

    groupedBy

    - build/js/j-visualizer.js:1593 + build/js/j-visualizer.js:1598

    @@ -605,7 +605,7 @@

    content

    - build/js/j-visualizer.js:1507 + build/js/j-visualizer.js:1512

    @@ -656,7 +656,7 @@

    dataset

    - build/js/j-visualizer.js:1525 + build/js/j-visualizer.js:1530

    @@ -705,7 +705,7 @@

    maxLength

    - build/js/j-visualizer.js:1495 + build/js/j-visualizer.js:1500

    @@ -753,7 +753,7 @@

    moduleViews

    - build/js/j-visualizer.js:1540 + build/js/j-visualizer.js:1545

    @@ -801,7 +801,7 @@

    visualizer

    - build/js/j-visualizer.js:1486 + build/js/j-visualizer.js:1491

    diff --git a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html index b047a18..232a733 100644 --- a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html +++ b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html @@ -114,7 +114,7 @@

    Visualizer.ModuleView.ResizableMixin Class

    @@ -261,7 +261,7 @@

    _tryUpdateValue

    - build/js/j-visualizer.js:2066 + build/js/j-visualizer.js:2071

    @@ -427,7 +427,7 @@

    _updateSize

    - build/js/j-visualizer.js:2029 + build/js/j-visualizer.js:2034

    @@ -541,7 +541,7 @@

    run

    - build/js/j-visualizer.js:2010 + build/js/j-visualizer.js:2015

    diff --git a/documentation/classes/Visualizer.ModuleView.html b/documentation/classes/Visualizer.ModuleView.html index 1bc35ef..176caa8 100644 --- a/documentation/classes/Visualizer.ModuleView.html +++ b/documentation/classes/Visualizer.ModuleView.html @@ -114,7 +114,7 @@

    Visualizer.ModuleView Class

    @@ -356,7 +356,7 @@

    $container

    - build/js/j-visualizer.js:1845 + build/js/j-visualizer.js:1850

    @@ -465,7 +465,7 @@

    _presetContainerAttrs

    - build/js/j-visualizer.js:1963 + build/js/j-visualizer.js:1968

    @@ -584,7 +584,7 @@

    _updateDimension

    - build/js/j-visualizer.js:1934 + build/js/j-visualizer.js:1939

    @@ -705,7 +705,7 @@

    clear

    - build/js/j-visualizer.js:1767 + build/js/j-visualizer.js:1772

    @@ -784,7 +784,7 @@

    destroy

    - build/js/j-visualizer.js:1786 + build/js/j-visualizer.js:1791

    @@ -859,7 +859,7 @@

    hardReset

    - build/js/j-visualizer.js:1862 + build/js/j-visualizer.js:1867

    @@ -950,7 +950,7 @@

    height

    - build/js/j-visualizer.js:1920 + build/js/j-visualizer.js:1925

    @@ -1081,7 +1081,7 @@

    run

    - build/js/j-visualizer.js:1802 + build/js/j-visualizer.js:1807

    @@ -1208,7 +1208,7 @@

    updateSelector

    - build/js/j-visualizer.js:1827 + build/js/j-visualizer.js:1832

    @@ -1315,7 +1315,7 @@

    widgetParamedOutlineCSS

    - build/js/j-visualizer.js:1876 + build/js/j-visualizer.js:1881

    @@ -1436,7 +1436,7 @@

    width

    - build/js/j-visualizer.js:1906 + build/js/j-visualizer.js:1911

    @@ -1546,7 +1546,7 @@

    arrangedContent

    - build/js/j-visualizer.js:1726 + build/js/j-visualizer.js:1731

    @@ -1595,7 +1595,7 @@

    containerSelector

    - build/js/j-visualizer.js:1677 + build/js/j-visualizer.js:1682

    @@ -1647,7 +1647,7 @@

    data

    - build/js/j-visualizer.js:1717 + build/js/j-visualizer.js:1722

    @@ -1692,7 +1692,7 @@

    dimensionsDidChange

    - build/js/j-visualizer.js:1740 + build/js/j-visualizer.js:1745

    @@ -1741,7 +1741,7 @@

    module

    - build/js/j-visualizer.js:1668 + build/js/j-visualizer.js:1673

    @@ -1786,7 +1786,7 @@

    previousSelectors

    - build/js/j-visualizer.js:1695 + build/js/j-visualizer.js:1700

    @@ -1833,7 +1833,7 @@

    visualizer

    - build/js/j-visualizer.js:1708 + build/js/j-visualizer.js:1713

    diff --git a/documentation/classes/Visualizer.Utils.html b/documentation/classes/Visualizer.Utils.html index afaee42..6934958 100644 --- a/documentation/classes/Visualizer.Utils.html +++ b/documentation/classes/Visualizer.Utils.html @@ -110,7 +110,7 @@

    Visualizer.Utils Class

    @@ -311,7 +311,7 @@

    boundedVal

    - build/js/j-visualizer.js:1238 + build/js/j-visualizer.js:1243

    @@ -454,7 +454,7 @@

    cloneArray

    - build/js/j-visualizer.js:1384 + build/js/j-visualizer.js:1389

    @@ -563,7 +563,7 @@

    existsWithValue

    - build/js/j-visualizer.js:1163 + build/js/j-visualizer.js:1168

    @@ -676,7 +676,7 @@

    intersectionCount

    - build/js/j-visualizer.js:1353 + build/js/j-visualizer.js:1358

    @@ -811,7 +811,7 @@

    intersectionSafe

    - build/js/j-visualizer.js:1320 + build/js/j-visualizer.js:1325

    @@ -939,7 +939,7 @@

    isArray

    - build/js/j-visualizer.js:1289 + build/js/j-visualizer.js:1294

    @@ -1052,7 +1052,7 @@

    maxVal

    - build/js/j-visualizer.js:1222 + build/js/j-visualizer.js:1227

    @@ -1181,7 +1181,7 @@

    minVal

    - build/js/j-visualizer.js:1206 + build/js/j-visualizer.js:1211

    @@ -1310,7 +1310,7 @@

    randBetween

    - build/js/j-visualizer.js:1259 + build/js/j-visualizer.js:1264

    @@ -1441,7 +1441,7 @@

    randIntBetween

    - build/js/j-visualizer.js:1277 + build/js/j-visualizer.js:1282

    @@ -1570,7 +1570,7 @@

    relativeSizeString

    - build/js/j-visualizer.js:1300 + build/js/j-visualizer.js:1305

    @@ -1713,7 +1713,7 @@

    waitForRepeatingEvents

    - build/js/j-visualizer.js:1174 + build/js/j-visualizer.js:1179

    diff --git a/documentation/classes/Visualizer.World.html b/documentation/classes/Visualizer.World.html index cb2a871..c632038 100644 --- a/documentation/classes/Visualizer.World.html +++ b/documentation/classes/Visualizer.World.html @@ -530,7 +530,7 @@

    _handlePhasedButtonClick

    - build/js/j-visualizer.js:865 + build/js/j-visualizer.js:870

    diff --git a/documentation/classes/jQuery.fn.html b/documentation/classes/jQuery.fn.html index a985d16..11bc854 100644 --- a/documentation/classes/jQuery.fn.html +++ b/documentation/classes/jQuery.fn.html @@ -220,7 +220,7 @@

    addExpiringClass

    - build/js/j-visualizer.js:967 + build/js/j-visualizer.js:972

    diff --git a/documentation/data.json b/documentation/data.json index 462e28d..a903a34 100644 --- a/documentation/data.json +++ b/documentation/data.json @@ -136,7 +136,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1150, + "line": 1155, "description": "Visualizer Utils\nA collection of common utility functions used in the Visualizer." }, "Visualizer.Module": { @@ -149,7 +149,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1469, + "line": 1474, "description": "Visualizer Module\nA Visualizer Module is a collection of data used for Visualization.\nIt keeps access slightly standardized and offers several helpers to\nsimplify data management.\n\nEach Module also has a collection of relevant ModuleViews - Objects that\ndefine and take care of how a given Module's data can be displayed.", "extends": "Ember.ArrayController" }, @@ -163,7 +163,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1653, + "line": 1658, "description": "Visualizer ModuleView\nModule Views encapsulate the functionality for drawing,\ncoloring, and handling events on visualizations of the data\nprovided by a Module. These are the \"visual\" side of\ndata visualizations.", "extends": "Ember.Object" }, @@ -179,7 +179,7 @@ ], "namespace": "Visualizer.ModuleView", "file": "build/js/j-visualizer.js", - "line": 1994, + "line": 1999, "description": "ResizableMixin\nA helper mixin for ModuleViews which can have their size set manually.\nThis simplifies specifying size, padding, and position of a ModuleView\nviewport container, and allows values to be set either relatively\n(as a percentage of the Visualizer's World), or explicitly (e.g. \"50px\" or 50)", "extends": "Ember.Mixin" } @@ -863,7 +863,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 865, + "line": 870, "description": "_handlePhasedButtonClick is called when an element with class phasedButton\nis clicked. Adds a class 'disabledItem' to the element for 2 seconds;\nif the element is clicked again before the class 'disabledItem' class expires,\nthe click will be ignored.", "itemtype": "method", "name": "_handlePhasedButtonClick", @@ -878,7 +878,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 891, + "line": 896, "description": "removeInstancesOf removes traces of a provided value from an Array", "itemtype": "method", "name": "removeInstancesOf", @@ -897,7 +897,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 915, + "line": 920, "description": "shuffleVals - Fisher-Yates algorithm for shuffling arrays\nin-place. (Essentially goes through each slot in array and\nswitches its value with one from a random slot...)", "itemtype": "method", "name": "shuffleVals", @@ -910,7 +910,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 945, + "line": 950, "description": "values takes an Object and returns its values\n(similar to `.keys()`)", "itemtype": "method", "name": "values", @@ -923,7 +923,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 967, + "line": 972, "description": "addExpiringClass adds a temporary class to a JQuery object.\nThe class has an expiry, after which it is removed.", "itemtype": "method", "name": "addExpiringClass", @@ -952,7 +952,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1000, + "line": 1005, "description": "truncateTo ensures a string is no longer than a given size limit.\n(In the case that it is longer, a suffix can be given for truncation)", "itemtype": "method", "name": "truncateTo", @@ -979,7 +979,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1029, + "line": 1034, "description": "advancedIndexOf searches the object String for a parameter\nsubstring, allows additional options (such as case-insensitivity).", "itemtype": "method", "name": "advancedIndexOf", @@ -1005,7 +1005,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1056, + "line": 1061, "description": "includes searches the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "includes", @@ -1032,7 +1032,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1076, + "line": 1081, "description": "beginsWith searches the start of the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "beginsWith", @@ -1059,7 +1059,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1096, + "line": 1101, "description": "capitalizeLetter is a String capitalize function adapted from\nhttp://stackoverflow.com/a/3291856/624590 .\nCapitalizes the letter at position n of the object String.", "itemtype": "method", "name": "capitalizeLetter", @@ -1081,7 +1081,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1118, + "line": 1123, "description": "titleize creates a title-formatted copy of a String", "itemtype": "method", "name": "titleize", @@ -1094,7 +1094,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1134, + "line": 1139, "description": "removeInitialUnderscore removes the first leading underscore from a String", "itemtype": "method", "name": "removeInitialUnderscore", @@ -1107,7 +1107,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1163, + "line": 1168, "description": "existsWithValue checks if a values isn't null/undefined", "itemtype": "method", "name": "existsWithValue", @@ -1127,7 +1127,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1174, + "line": 1179, "description": "waitForRepeatingEvents is a debounce-like function for preventing\nmultiple execution. It should be called with a function and an\namount of time to wait. It can also be provided a timer name so as\nto namespace the blocked items. It can also be called with an Object\ntimer set to allow different objects to not prevent the execution of\nfunctions in others.", "itemtype": "method", "name": "waitForRepeatingEvents", @@ -1162,7 +1162,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1206, + "line": 1211, "description": "minVal takes two parameters, returns the smaller", "itemtype": "method", "name": "minVal", @@ -1187,7 +1187,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1222, + "line": 1227, "description": "maxVal takes two parameters, returns the larger", "itemtype": "method", "name": "maxVal", @@ -1212,7 +1212,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1238, + "line": 1243, "description": "boundedVal takes three parameters: an item, the lower bound,\nand the upper bound. If the item is between the bounds,\nthe item is returned, otherwise the failed bound is returned.", "itemtype": "method", "name": "boundedVal", @@ -1242,7 +1242,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1259, + "line": 1264, "description": "randBetween provides a random number between two values.", "itemtype": "method", "name": "randBetween", @@ -1271,7 +1271,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1277, + "line": 1282, "description": "randIntBetween provides a random (rounded) Integer between two values.", "itemtype": "method", "name": "randIntBetween", @@ -1296,7 +1296,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1289, + "line": 1294, "description": "isArray returns a flag of whether the parameter is of type Array", "itemtype": "method", "name": "isArray", @@ -1316,7 +1316,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1300, + "line": 1305, "description": "relativeSizeString parses an input size for either an explicit\nvalue, or a value in relationship to some parent value.\nE.g. \"50%\" of 900 = 450, \"50\" = 50, \"50px\" = 50", "itemtype": "method", "name": "relativeSizeString", @@ -1341,7 +1341,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1320, + "line": 1325, "description": "intersectionSafe is simple intersection code, iterates along two\nsorted arrays incrementing the index of the smaller value\n(if values are equal, it is part of intersection, and so store position and iterate both).\nReturns array of indices of intersecting values with respect to the first array passed.\n\nintersectionSafe is modified from code found on StackOverflow at:\nhttp://stackoverflow.com/a/1885660/624590", "itemtype": "method", "name": "intersectionSafe", @@ -1366,7 +1366,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1353, + "line": 1358, "description": "intersectionCount is a modified form of intersectionSafe that simply\nincrements a counter instead of building an intersection Array.\n(Faster because increments rather than pushing values to array,\nalso more memory efficient; JSPerf suggests 100% performance increase\n- beneficial for large datasets...)", "itemtype": "method", "name": "intersectionCount", @@ -1391,7 +1391,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1384, + "line": 1389, "description": "cloneArray creates a copy of an Array.", "deprecated": true, "deprecationMessage": "use Array.copy instead.", @@ -1413,7 +1413,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1486, + "line": 1491, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1424,7 +1424,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1495, + "line": 1500, "description": "maxLength is an integer size of how much data should be displayed.\nSometimes a project will collect more data than is practical to display\nto the user (either because it will be confusing, or otherwise too slow);\nthis property represents that limit.", "itemtype": "property", "name": "maxLength", @@ -1435,7 +1435,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1507, + "line": 1512, "description": "content is the full set of data (in Array , Ember.Array) form that is\navailable to this Module.\n\nNote: this attribute should only be accessed from the\ndata-management side of your app; it's where you dump data, and it's\nwhat you generally access for front-end filtering. This Module's\nModuleViews should not access the content, however - they should access\nthe dataset (which is a subset of content).", "itemtype": "property", "name": "content", @@ -1446,7 +1446,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1525, + "line": 1530, "description": "dataset is the subset of content used for current visualization.\nIt can potentially be the exact same data as content, in full,\nbut it can also be a limited/truncated version (often using the\nmaxLength property). It may also filtered down by properties, etc.\n\nModuleViews should only look here for their Module data.", "itemtype": "property", "name": "dataset", @@ -1457,7 +1457,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1540, + "line": 1545, "description": "moduleViews an object dictionary/map of Visualizer ModuleView objects,\neach of which must be relevant to this particular Module's data structuring.\n\nFor example, if this Module is a set of words with frequencies, a WordCloud\nmay be an applicable ModuleView.", "itemtype": "property", "name": "moduleViews", @@ -1468,7 +1468,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1555, + "line": 1560, "description": "init is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", "is_constructor": 1, "class": "Visualizer.Module", @@ -1476,7 +1476,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1571, + "line": 1576, "description": "forceLimit sorts the current data by a provided key, and selects only the\nfirst maxLength (property) items for this Module's dataset, ensuring that\nthe limit to the viewed-data's size is enforced.", "todo": [ "consider implementing a n-item max-heap data structure instead of sorting" @@ -1501,7 +1501,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1593, + "line": 1598, "description": "groupedBy creates a cached property on the Module to retrieve its data\nin the form of a two-dimensional Array, where the sub arrays contain\nthis Module's dataset split into sets that share a common (passed) property.\n\nThe outside Array is sorted by length, so the largest groups are at the start.\n\nSince the result is cached, it will only be recomputed when the dataset changes,\nkeeping this efficient. The first time you use groupBy for any given property\nafter the data changes (or is created) runs O(nlogn), but each subsequent access\nis simply O(1) as it simply grabs the previous data. Say what??? :P", "itemtype": "method", "name": "groupedBy", @@ -1521,7 +1521,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1625, + "line": 1630, "description": "_groupedBy groups the Module's dataset by a given property, returning\nan unsorted, two-dimensional array.\n\nThis method should not be called explicitly, instead developers should\ngo through the `groupedBy` method (no leading underscore), which\ncaches the groups (making redraws far more efficient)", "itemtype": "method", "name": "_groupedBy", @@ -1541,7 +1541,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1668, + "line": 1673, "description": "module is a reference to the parent Module for this ModuleView instance.", "itemtype": "property", "name": "module", @@ -1552,7 +1552,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1677, + "line": 1682, "description": "containerSelector is a string CSS selector used for finding\nthis ModuleView's window in a Visualization.\n\nOften unique, but occasionally multiple ModuleViews will be\nwritten to share a container.\n\nOften this property will be specified in a widget's parameters,\notherwise child classes to ModuleView should specify defaults.\nIf a widget does specify a `container` param, it will be set and used\nrunning any operation.", "itemtype": "property", "name": "containerSelector", @@ -1563,7 +1563,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1695, + "line": 1700, "description": "previousSelectors is a list history of selectors that were\npreviously set as this instance of a ModuleView's containerSelector.\n\nThis may be useful for navigation, or for cleaning up after a visualization.", "itemtype": "property", "name": "previousSelectors", @@ -1573,7 +1573,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1708, + "line": 1713, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1584,7 +1584,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1717, + "line": 1722, "description": "data is a reference to the visible data for visualization.", "itemtype": "property", "name": "data", @@ -1595,7 +1595,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1726, + "line": 1731, "description": "arrangedContent is a reference to all Module data (sorted/arranged).\nThis property should only seldom be accessed because it includes\ndata which is deemed irrelevant by the Module (filtered, etc.)\n\nIt may, however, be useful if a View decides to animate old data away\nupon filtering / limiting its viewable data.", "itemtype": "property", "name": "arrangedContent", @@ -1606,7 +1606,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1740, + "line": 1745, "description": "dimensionsDidChange is a flag used by ModuleViews to decide how much\nprocessing is required when they run an operation.\n\nIf all dimensions, including visible data, width, and height, are\nunchanged, often times the old Visualization can simply be shown.\n\nSet to true by default, so that ModuleViews can have a proper first-draw.", "itemtype": "property", "name": "dimensionsDidChange", @@ -1616,7 +1616,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1754, + "line": 1759, "description": "init is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", "is_constructor": 1, "class": "Visualizer.ModuleView", @@ -1624,7 +1624,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1767, + "line": 1772, "description": "clear cleanses/hides the current ModuleView from the visualization.\n\nThis method is often called when a widget representing the ModuleView\nleaves a visualization (either being removed from a scene,\nor not being part of a new scene.)\n\nEach ModuleView should implement/override this, and should\nprovide (at least) the following functionality:\n - hide the container/elements (to prevent overlap/event-disruption),\n - unset isDrawn so that next time we know to fully redraw, etc.\n\nOptionally, it should also empty the DOM Node/SVG to save memory", "itemtype": "method", "name": "clear", @@ -1637,7 +1637,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1786, + "line": 1791, "description": "destroy totally removes the current ModuleView from the visualization.\nThis should entirely empty and remove any DOM-or-SVG Elements from the\ndocument.\n\nThis method is rarely called unless the Visualizer is being removed entirely.\n\nEach ModuleView should implement/override this function.", "itemtype": "method", "name": "destroy", @@ -1650,7 +1650,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1802, + "line": 1807, "description": "run is used used to execute a widget's operation on a ModuleView.\nMany times additional parameters are passed, these assist in updating a\nModuleView by providing the widget's specifications (container, width,\nany data limitations, etc.)\n\nIf params includes a `container` key, its value will be used to define\nthis particular ModuleView's container viewport.", "itemtype": "method", "name": "run", @@ -1676,7 +1676,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1827, + "line": 1832, "description": "updateSelector takes a new containerSelector parameter, and uses it to\nchange this ModuleView's viewport. It also updates the `previousSelectors`\nhistory to contain the selector that was used before this method was called.", "itemtype": "method", "name": "updateSelector", @@ -1696,7 +1696,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1845, + "line": 1850, "description": "$container is a method which returns the ModuleView's container/viewport\nJQuery Object.\n\nIf a parameter is passed, $container will attempt to find that parameter\nwithing the structure of its container object.", "itemtype": "method", "name": "$container", @@ -1717,7 +1717,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1862, + "line": 1867, "description": "hardReset clears out the ModuleView and tells it that dimensionsDidChange,\nso the next redraw/execution is a fresh one (fully recalculated).\n\nThis is automatically called when the ModuleView's data changes.", "itemtype": "method", "name": "hardReset", @@ -1730,7 +1730,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1876, + "line": 1881, "description": "widgetParamedOutlineCSS provides an Object where keys/values map to CSS attributes\nrelevant to the container ONLY for manually specified dimensions/positions.\n\nThe point of this method is to provide access to data that can be used to set the\nstyle of the DOM element containing this ModuleView to the manually-set specifications.\n\nIf a developer opts to simply use a container's size/position, this will return an\nempty object.", "itemtype": "method", "name": "widgetParamedOutlineCSS", @@ -1751,7 +1751,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1906, + "line": 1911, "description": "width getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "width", @@ -1778,7 +1778,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1920, + "line": 1925, "description": "height getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "height", @@ -1805,7 +1805,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1934, + "line": 1939, "description": "_updateDimension is used when setting width or height.\nIt accepts a key (which should be set to \"width\" or \"height\"),\nand a value.\n\nThe value is rounded down to the nearest integer to keep the DOM clean,\nand to keep determining changes simple.\n\nIf the value isn't the same as this ModuleView's previous value for the\nsame key property, dimensionsDidChange flag will be set true so that the\nModuleView knows to perform its next operation with full calculations.", "itemtype": "method", "name": "_updateDimension", @@ -1832,7 +1832,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1963, + "line": 1968, "description": "_presetContainerAttrs is used when running an operation to ensure that\nrequired attributes based on the viewport (such as available width/height)\nfor visualization are set.\n\nIf width or height are manually specified, this will not update that attribute -\nin these cases, the ModuleView should know how to handle explicit dimensions.\nThe \"resizable mixin\" can help with this (more details in _resizable_mixin file)", "itemtype": "method", "name": "_presetContainerAttrs", @@ -1853,7 +1853,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2010, + "line": 2015, "description": "run hijacks the ModuleView's run method to first attempt to update\nthe viewport's size based on the parameter specifications.\nAfter attempting to update the size/position of the viewport,\nthe ModuleView's run function is allowed to proceed.", "itemtype": "method", "name": "run", @@ -1879,7 +1879,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2029, + "line": 2034, "description": "_updateSize scans the widget-sent params for manually-set\nsize/position values, uses these to set up the ModuleView's\nrelevant attributes.", "itemtype": "method", "name": "_updateSize", @@ -1902,7 +1902,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2066, + "line": 2071, "description": "_tryUpdateValue given a sizing/position-defining key and value,\nthis method attempts to parse the value and, if it's a relative\npercentage or String, coerce it to an integer.\n\nAllows values to be explicit (e.g. 50, or \"50px\"), or relative\nto the Visualizer's World (e.g. \"50%\"). Parameter relativeReq is\nused to specify which of the World's parameters should be used to\ndetermine a relative size (e.g. \"left\" uses the World's \"width\").\n\nparams may also specify an amount of padding.", "itemtype": "method", "name": "_tryUpdateValue", @@ -1956,11 +1956,11 @@ }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", - "line": " build/js/j-visualizer.js:1555" + "line": " build/js/j-visualizer.js:1560" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", - "line": " build/js/j-visualizer.js:1754" + "line": " build/js/j-visualizer.js:1759" } ] } \ No newline at end of file diff --git a/documentation/files/build_js_j-visualizer.js.html b/documentation/files/build_js_j-visualizer.js.html index 4a7754a..24309a1 100644 --- a/documentation/files/build_js_j-visualizer.js.html +++ b/documentation/files/build_js_j-visualizer.js.html @@ -965,6 +965,11 @@

    File: build/js/j-visualizer.js

    * @return {void} */ injectDefaultWorld: function() { + if (typeof console !== "undefined" && console !== null) { + if (typeof console.warn === "function") { + console.warn("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version."); + } + } return this.$().empty().append($(defaultWorldTemplate)); } }); @@ -991,7 +996,7 @@

    File: build/js/j-visualizer.js

    }); }; - defaultWorldTemplate = "<div id='static-area' class='static-area'> <div id='visualizer-loading-indicator'> </div> </div> <div id='shared-area'> </div>"; + defaultWorldTemplate = "<div id='static-area' class='static-area'> <div id='visualizer-loading-indicator'> </div> </div> <div id='shared-area' class='shared-area'> </div>"; }).call(this); diff --git a/src/vis_world.js.coffee b/src/vis_world.js.coffee index 78aadfa..d096076 100644 --- a/src/vis_world.js.coffee +++ b/src/vis_world.js.coffee @@ -91,6 +91,7 @@ # @return {void} ### injectDefaultWorld: ()-> + console?.warn?("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version.") @$().empty().append $(defaultWorldTemplate) ###* @@ -117,5 +118,5 @@ defaultWorldTemplate = "
    -
    +
    " From d055394e0c5acadb73ea7e4e9621ca7c921b454f Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Thu, 24 Apr 2014 09:05:09 -0400 Subject: [PATCH 3/7] Feature #6679 - Add requestRedraw function to modules for to prevent flickering and provide performance enhancements Reviewed by: Josh, Gabe --- documentation/classes/NativeClass.Array.html | 6 +- documentation/classes/NativeClass.String.html | 14 +- documentation/classes/Visualizer.Colorer.html | 36 +-- documentation/classes/Visualizer.Module.html | 97 +++++++- .../Visualizer.ModuleView.ResizableMixin.html | 8 +- .../classes/Visualizer.ModuleView.html | 38 +-- documentation/classes/Visualizer.Scene.html | 81 +++++- documentation/classes/Visualizer.Utils.html | 26 +- documentation/classes/Visualizer.World.html | 16 +- documentation/classes/Visualizer.html | 8 +- documentation/classes/jQuery.fn.html | 2 +- documentation/data.json | 233 ++++++++++-------- .../files/build_js_j-visualizer.js.html | 90 +++++-- spec/fixtures/vis_fixtures.js | 2 + spec/modules/modules_spec.js | 22 +- spec/vis_scene/vis_scene_spec.js | 95 +++---- src/j_visualizer.js.coffee | 5 +- src/modules/_visualizer_module.js.coffee | 13 + src/vis_scene.js.coffee | 41 ++- 19 files changed, 550 insertions(+), 283 deletions(-) diff --git a/documentation/classes/NativeClass.Array.html b/documentation/classes/NativeClass.Array.html index d7ad952..85463b5 100644 --- a/documentation/classes/NativeClass.Array.html +++ b/documentation/classes/NativeClass.Array.html @@ -228,7 +228,7 @@

    removeInstancesOf

    - build/js/j-visualizer.js:896 + build/js/j-visualizer.js:916

    @@ -325,7 +325,7 @@

    shuffleVals

    - build/js/j-visualizer.js:920 + build/js/j-visualizer.js:940

    @@ -400,7 +400,7 @@

    values

    - build/js/j-visualizer.js:950 + build/js/j-visualizer.js:970

    diff --git a/documentation/classes/NativeClass.String.html b/documentation/classes/NativeClass.String.html index 9fed922..933eef0 100644 --- a/documentation/classes/NativeClass.String.html +++ b/documentation/classes/NativeClass.String.html @@ -262,7 +262,7 @@

    advancedIndexOf

    - build/js/j-visualizer.js:1034 + build/js/j-visualizer.js:1054

    @@ -394,7 +394,7 @@

    beginsWith

    - build/js/j-visualizer.js:1081 + build/js/j-visualizer.js:1101

    @@ -520,7 +520,7 @@

    capitalizeLetter

    - build/js/j-visualizer.js:1101 + build/js/j-visualizer.js:1121

    @@ -636,7 +636,7 @@

    includes

    - build/js/j-visualizer.js:1061 + build/js/j-visualizer.js:1081

    @@ -752,7 +752,7 @@

    removeInitialUnderscore

    - build/js/j-visualizer.js:1139 + build/js/j-visualizer.js:1159

    @@ -825,7 +825,7 @@

    titleize

    - build/js/j-visualizer.js:1123 + build/js/j-visualizer.js:1143

    @@ -914,7 +914,7 @@

    truncateTo

    - build/js/j-visualizer.js:1005 + build/js/j-visualizer.js:1025

    diff --git a/documentation/classes/Visualizer.Colorer.html b/documentation/classes/Visualizer.Colorer.html index 82a9653..31aff18 100644 --- a/documentation/classes/Visualizer.Colorer.html +++ b/documentation/classes/Visualizer.Colorer.html @@ -114,7 +114,7 @@

    Visualizer.Colorer Class

    @@ -346,7 +346,7 @@

    _rotating_color

    - build/js/j-visualizer.js:508 + build/js/j-visualizer.js:510

    @@ -448,7 +448,7 @@

    _setUniqueProps

    - build/js/j-visualizer.js:354 + build/js/j-visualizer.js:356

    @@ -539,7 +539,7 @@

    fixed

    - build/js/j-visualizer.js:279 + build/js/j-visualizer.js:281

    @@ -639,7 +639,7 @@

    freshColorPalette

    - build/js/j-visualizer.js:267 + build/js/j-visualizer.js:269

    @@ -729,7 +729,7 @@

    unique

    - build/js/j-visualizer.js:328 + build/js/j-visualizer.js:330

    @@ -857,7 +857,7 @@

    unique._prepareSet

    - build/js/j-visualizer.js:461 + build/js/j-visualizer.js:463

    @@ -968,7 +968,7 @@

    unique.assign

    - build/js/j-visualizer.js:395 + build/js/j-visualizer.js:397

    @@ -1090,7 +1090,7 @@

    unique.next

    - build/js/j-visualizer.js:377 + build/js/j-visualizer.js:379

    @@ -1199,7 +1199,7 @@

    unique.resetSet

    - build/js/j-visualizer.js:446 + build/js/j-visualizer.js:448

    @@ -1311,7 +1311,7 @@

    unique.unassign

    - build/js/j-visualizer.js:417 + build/js/j-visualizer.js:419

    @@ -1419,7 +1419,7 @@

    _colorScheme

    - build/js/j-visualizer.js:496 + build/js/j-visualizer.js:498

    @@ -1464,7 +1464,7 @@

    _defaultAssigned

    - build/js/j-visualizer.js:477 + build/js/j-visualizer.js:479

    @@ -1511,7 +1511,7 @@

    _defaultUnassigned

    - build/js/j-visualizer.js:487 + build/js/j-visualizer.js:489

    @@ -1557,7 +1557,7 @@

    _fixedVals

    - build/js/j-visualizer.js:534 + build/js/j-visualizer.js:536

    @@ -1603,7 +1603,7 @@

    uniquePalette

    - build/js/j-visualizer.js:301 + build/js/j-visualizer.js:303

    @@ -1650,7 +1650,7 @@

    uniquePalette

    - build/js/j-visualizer.js:314 + build/js/j-visualizer.js:316

    @@ -1698,7 +1698,7 @@

    visualizer

    - build/js/j-visualizer.js:246 + build/js/j-visualizer.js:248

    diff --git a/documentation/classes/Visualizer.Module.html b/documentation/classes/Visualizer.Module.html index b47b872..569adeb 100644 --- a/documentation/classes/Visualizer.Module.html +++ b/documentation/classes/Visualizer.Module.html @@ -114,7 +114,7 @@

    Visualizer.Module Class

    @@ -180,6 +180,13 @@

    Methods

    + + +
  • + requestRedraw + + +
  • @@ -287,7 +294,7 @@

    _groupedBy

    - build/js/j-visualizer.js:1630 + build/js/j-visualizer.js:1666

    @@ -398,7 +405,7 @@

    forceLimit

    - build/js/j-visualizer.js:1576 + build/js/j-visualizer.js:1612

    @@ -506,7 +513,7 @@

    groupedBy

    - build/js/j-visualizer.js:1598 + build/js/j-visualizer.js:1634

    @@ -571,6 +578,78 @@

    Returns:

    +
    + + +
    +

    requestRedraw

    + + + () + + + + + Void + + + + + + + + + + + + + + + +
    + + + +

    + + Defined in + + + + + build/js/j-visualizer.js:1596 + +

    + + + + + +
    + +
    +

    requestRedraw sends a request to the current scene +to redraw the widgets relevant to this module (and no others).

    + +
    + + + + +
    +

    Returns:

    + +
    + + + Void: + + +
    +
    + + +
    @@ -605,7 +684,7 @@

    content

    - build/js/j-visualizer.js:1512 + build/js/j-visualizer.js:1532

    @@ -656,7 +735,7 @@

    dataset

    - build/js/j-visualizer.js:1530 + build/js/j-visualizer.js:1550

    @@ -705,7 +784,7 @@

    maxLength

    - build/js/j-visualizer.js:1500 + build/js/j-visualizer.js:1520

    @@ -753,7 +832,7 @@

    moduleViews

    - build/js/j-visualizer.js:1545 + build/js/j-visualizer.js:1565

    @@ -801,7 +880,7 @@

    visualizer

    - build/js/j-visualizer.js:1491 + build/js/j-visualizer.js:1511

    diff --git a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html index 232a733..a8365b0 100644 --- a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html +++ b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html @@ -114,7 +114,7 @@

    Visualizer.ModuleView.ResizableMixin Class

    @@ -261,7 +261,7 @@

    _tryUpdateValue

    - build/js/j-visualizer.js:2071 + build/js/j-visualizer.js:2107

    @@ -427,7 +427,7 @@

    _updateSize

    - build/js/j-visualizer.js:2034 + build/js/j-visualizer.js:2070

    @@ -541,7 +541,7 @@

    run

    - build/js/j-visualizer.js:2015 + build/js/j-visualizer.js:2051

    diff --git a/documentation/classes/Visualizer.ModuleView.html b/documentation/classes/Visualizer.ModuleView.html index 176caa8..43e2a5e 100644 --- a/documentation/classes/Visualizer.ModuleView.html +++ b/documentation/classes/Visualizer.ModuleView.html @@ -114,7 +114,7 @@

    Visualizer.ModuleView Class

    @@ -356,7 +356,7 @@

    $container

    - build/js/j-visualizer.js:1850 + build/js/j-visualizer.js:1886

    @@ -465,7 +465,7 @@

    _presetContainerAttrs

    - build/js/j-visualizer.js:1968 + build/js/j-visualizer.js:2004

    @@ -584,7 +584,7 @@

    _updateDimension

    - build/js/j-visualizer.js:1939 + build/js/j-visualizer.js:1975

    @@ -705,7 +705,7 @@

    clear

    - build/js/j-visualizer.js:1772 + build/js/j-visualizer.js:1808

    @@ -784,7 +784,7 @@

    destroy

    - build/js/j-visualizer.js:1791 + build/js/j-visualizer.js:1827

    @@ -859,7 +859,7 @@

    hardReset

    - build/js/j-visualizer.js:1867 + build/js/j-visualizer.js:1903

    @@ -950,7 +950,7 @@

    height

    - build/js/j-visualizer.js:1925 + build/js/j-visualizer.js:1961

    @@ -1081,7 +1081,7 @@

    run

    - build/js/j-visualizer.js:1807 + build/js/j-visualizer.js:1843

    @@ -1208,7 +1208,7 @@

    updateSelector

    - build/js/j-visualizer.js:1832 + build/js/j-visualizer.js:1868

    @@ -1315,7 +1315,7 @@

    widgetParamedOutlineCSS

    - build/js/j-visualizer.js:1881 + build/js/j-visualizer.js:1917

    @@ -1436,7 +1436,7 @@

    width

    - build/js/j-visualizer.js:1911 + build/js/j-visualizer.js:1947

    @@ -1546,7 +1546,7 @@

    arrangedContent

    - build/js/j-visualizer.js:1731 + build/js/j-visualizer.js:1767

    @@ -1595,7 +1595,7 @@

    containerSelector

    - build/js/j-visualizer.js:1682 + build/js/j-visualizer.js:1718

    @@ -1647,7 +1647,7 @@

    data

    - build/js/j-visualizer.js:1722 + build/js/j-visualizer.js:1758

    @@ -1692,7 +1692,7 @@

    dimensionsDidChange

    - build/js/j-visualizer.js:1745 + build/js/j-visualizer.js:1781

    @@ -1741,7 +1741,7 @@

    module

    - build/js/j-visualizer.js:1673 + build/js/j-visualizer.js:1709

    @@ -1786,7 +1786,7 @@

    previousSelectors

    - build/js/j-visualizer.js:1700 + build/js/j-visualizer.js:1736

    @@ -1833,7 +1833,7 @@

    visualizer

    - build/js/j-visualizer.js:1713 + build/js/j-visualizer.js:1749

    diff --git a/documentation/classes/Visualizer.Scene.html b/documentation/classes/Visualizer.Scene.html index cae21ad..7d7bb4a 100644 --- a/documentation/classes/Visualizer.Scene.html +++ b/documentation/classes/Visualizer.Scene.html @@ -114,7 +114,7 @@

    Visualizer.Scene Class

    @@ -202,6 +202,13 @@

    Properties

    + + +
  • + fullRefreshWait + + +
  • @@ -289,7 +296,7 @@

    clearUnusedViews

    - build/js/j-visualizer.js:667 + build/js/j-visualizer.js:680

    @@ -362,7 +369,7 @@

    reload

    - build/js/j-visualizer.js:725 + build/js/j-visualizer.js:745

    @@ -436,7 +443,7 @@

    runWidgets

    - build/js/j-visualizer.js:701 + build/js/j-visualizer.js:708

    @@ -505,7 +512,7 @@

    description

    - build/js/j-visualizer.js:609 + build/js/j-visualizer.js:611

    @@ -551,7 +558,7 @@

    drawWait

    - build/js/j-visualizer.js:619 + build/js/j-visualizer.js:621

    @@ -561,8 +568,8 @@

    drawWait

  • -

    drawWait is the debounce time waited before updating the scene. -If a scene's reload is requested many times in rapid succession it will wait +

    drawWait is the debounce time waited before running a single widget's update. +If a widget's reload is requested many times in rapid succession it will wait until drawWait milliseconds after the last call before executing the reload.

    @@ -574,6 +581,54 @@

    drawWait

    + + + +
    +

    fullRefreshWait

    + Integer (milliseconds) + + + + + + + + + +
    + + + +

    + + Defined in + + + + + build/js/j-visualizer.js:633 + +

    + + + + +
    + +
    +

    fullRefreshWait is an additional debounce time waited before +totally updating the scene. This adds some

    + +
    + + +

    Default: 20

    + + + + +
    @@ -600,7 +655,7 @@

    identifier

    - build/js/j-visualizer.js:590 + build/js/j-visualizer.js:592

    @@ -645,7 +700,7 @@

    requestedModuleViews

    - build/js/j-visualizer.js:644 + build/js/j-visualizer.js:657

    @@ -694,7 +749,7 @@

    title

    - build/js/j-visualizer.js:599 + build/js/j-visualizer.js:601

    @@ -740,7 +795,7 @@

    visualizer

    - build/js/j-visualizer.js:581 + build/js/j-visualizer.js:583

    @@ -785,7 +840,7 @@

    widgets

    - build/js/j-visualizer.js:631 + build/js/j-visualizer.js:644

    diff --git a/documentation/classes/Visualizer.Utils.html b/documentation/classes/Visualizer.Utils.html index 6934958..aa9498d 100644 --- a/documentation/classes/Visualizer.Utils.html +++ b/documentation/classes/Visualizer.Utils.html @@ -110,7 +110,7 @@

    Visualizer.Utils Class

    - Defined in: build/js/j-visualizer.js:1155 + Defined in: build/js/j-visualizer.js:1175
    @@ -311,7 +311,7 @@

    boundedVal

    - build/js/j-visualizer.js:1243 + build/js/j-visualizer.js:1263

    @@ -454,7 +454,7 @@

    cloneArray

    - build/js/j-visualizer.js:1389 + build/js/j-visualizer.js:1409

    @@ -563,7 +563,7 @@

    existsWithValue

    - build/js/j-visualizer.js:1168 + build/js/j-visualizer.js:1188

    @@ -676,7 +676,7 @@

    intersectionCount

    - build/js/j-visualizer.js:1358 + build/js/j-visualizer.js:1378

    @@ -811,7 +811,7 @@

    intersectionSafe

    - build/js/j-visualizer.js:1325 + build/js/j-visualizer.js:1345

    @@ -939,7 +939,7 @@

    isArray

    - build/js/j-visualizer.js:1294 + build/js/j-visualizer.js:1314

    @@ -1052,7 +1052,7 @@

    maxVal

    - build/js/j-visualizer.js:1227 + build/js/j-visualizer.js:1247

    @@ -1181,7 +1181,7 @@

    minVal

    - build/js/j-visualizer.js:1211 + build/js/j-visualizer.js:1231

    @@ -1310,7 +1310,7 @@

    randBetween

    - build/js/j-visualizer.js:1264 + build/js/j-visualizer.js:1284

    @@ -1441,7 +1441,7 @@

    randIntBetween

    - build/js/j-visualizer.js:1282 + build/js/j-visualizer.js:1302

    @@ -1570,7 +1570,7 @@

    relativeSizeString

    - build/js/j-visualizer.js:1305 + build/js/j-visualizer.js:1325

    @@ -1713,7 +1713,7 @@

    waitForRepeatingEvents

    - build/js/j-visualizer.js:1179 + build/js/j-visualizer.js:1199

    diff --git a/documentation/classes/Visualizer.World.html b/documentation/classes/Visualizer.World.html index c632038..b5278c9 100644 --- a/documentation/classes/Visualizer.World.html +++ b/documentation/classes/Visualizer.World.html @@ -114,7 +114,7 @@

    Visualizer.World Class

    - Defined in: build/js/j-visualizer.js:748 + Defined in: build/js/j-visualizer.js:768
    @@ -278,7 +278,7 @@

    $

    - build/js/j-visualizer.js:773 + build/js/j-visualizer.js:793

    @@ -378,7 +378,7 @@

    _bindGlobalEvents

    - build/js/j-visualizer.js:813 + build/js/j-visualizer.js:833

    @@ -454,7 +454,7 @@

    _bindWorldEvents

    - build/js/j-visualizer.js:832 + build/js/j-visualizer.js:852

    @@ -530,7 +530,7 @@

    _handlePhasedButtonClick

    - build/js/j-visualizer.js:870 + build/js/j-visualizer.js:890

    @@ -606,7 +606,7 @@

    injectDefaultWorld

    - build/js/j-visualizer.js:850 + build/js/j-visualizer.js:870

    @@ -680,7 +680,7 @@

    resize

    - build/js/j-visualizer.js:790 + build/js/j-visualizer.js:810

    @@ -748,7 +748,7 @@

    loaded

    - build/js/j-visualizer.js:762 + build/js/j-visualizer.js:782

    diff --git a/documentation/classes/Visualizer.html b/documentation/classes/Visualizer.html index 3335b72..8bfbc07 100644 --- a/documentation/classes/Visualizer.html +++ b/documentation/classes/Visualizer.html @@ -449,7 +449,7 @@

    destroy

    - build/js/j-visualizer.js:210 + build/js/j-visualizer.js:212

    @@ -520,7 +520,7 @@

    refresh

    - build/js/j-visualizer.js:145 + build/js/j-visualizer.js:147

    @@ -607,7 +607,7 @@

    setScene

    - build/js/j-visualizer.js:198 + build/js/j-visualizer.js:200

    @@ -713,7 +713,7 @@

    useScenes

    - build/js/j-visualizer.js:167 + build/js/j-visualizer.js:169

    diff --git a/documentation/classes/jQuery.fn.html b/documentation/classes/jQuery.fn.html index 11bc854..b66a22c 100644 --- a/documentation/classes/jQuery.fn.html +++ b/documentation/classes/jQuery.fn.html @@ -220,7 +220,7 @@

    addExpiringClass

    - build/js/j-visualizer.js:972 + build/js/j-visualizer.js:992

    diff --git a/documentation/data.json b/documentation/data.json index a903a34..38514a4 100644 --- a/documentation/data.json +++ b/documentation/data.json @@ -59,7 +59,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 232, + "line": 234, "description": "Visualizer Colorer\nAn Object that manages the many colors of a visualization.", "todo": [ "refactor this file", @@ -78,7 +78,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 564, + "line": 566, "description": "Visualizer Scene\nRepresents the Object used to manage data (Modules), and the way the data's viewed.\n\nThe visualization of data is a combined effort of all components contained in this project,\naccessed through this Object.", "extends": "Ember.Object" }, @@ -92,7 +92,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 748, + "line": 768, "description": "Visualizer World\nRepresents an Object used to manage an overview viewport for visualizations.", "extends": "Ember.Object" }, @@ -136,7 +136,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1155, + "line": 1175, "description": "Visualizer Utils\nA collection of common utility functions used in the Visualizer." }, "Visualizer.Module": { @@ -149,7 +149,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1474, + "line": 1494, "description": "Visualizer Module\nA Visualizer Module is a collection of data used for Visualization.\nIt keeps access slightly standardized and offers several helpers to\nsimplify data management.\n\nEach Module also has a collection of relevant ModuleViews - Objects that\ndefine and take care of how a given Module's data can be displayed.", "extends": "Ember.ArrayController" }, @@ -163,7 +163,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1658, + "line": 1694, "description": "Visualizer ModuleView\nModule Views encapsulate the functionality for drawing,\ncoloring, and handling events on visualizations of the data\nprovided by a Module. These are the \"visual\" side of\ndata visualizations.", "extends": "Ember.Object" }, @@ -179,7 +179,7 @@ ], "namespace": "Visualizer.ModuleView", "file": "build/js/j-visualizer.js", - "line": 1999, + "line": 2035, "description": "ResizableMixin\nA helper mixin for ModuleViews which can have their size set manually.\nThis simplifies specifying size, padding, and position of a ModuleView\nviewport container, and allows values to be set either relatively\n(as a percentage of the Visualizer's World), or explicitly (e.g. \"50px\" or 50)", "extends": "Ember.Mixin" } @@ -301,7 +301,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 145, + "line": 147, "description": "refresh sends a request to the current scene to update the visualization\nbased on all current dimensions.\n\nThe scene will not be drawn unless the Visualizer's World is loaded (has a viewport).\n\nrefresh observes the world's state, and the current scene - it should automatically\nbe triggered when any of these things change to ensure an up-to-date Visualization.\n\nNote: because Ember Observers currently only watch Array collections (@each), not Object-maps,\nThis will (sadly) not currently watch 'modules.@each.dataset'...", "itemtype": "method", "name": "refresh", @@ -313,7 +313,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 167, + "line": 169, "description": "useScenes updates the Visualizer's scenes collection with the inputScenes parameter.\nFor each item in inputScenes , a Visualizer.Scene object is created, with a\nreference to this instance of Visualizer as its visualizer parameter.", "itemtype": "method", "name": "useScenes", @@ -332,7 +332,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 198, + "line": 200, "description": "setScene updates the Visualizer's currentScene property to reference the\nscene relevant to the method's _identifier parameter.", "itemtype": "method", "name": "setScene", @@ -351,7 +351,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 210, + "line": 212, "description": "destroy cleans up the Visualizer (asking each Module to remove its Views, etc.)", "itemtype": "method", "name": "destroy", @@ -363,7 +363,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 246, + "line": 248, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -374,7 +374,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 255, + "line": 257, "description": "init is called upon creation of a Visualizer Colorer Object.\nIt is responsible for the initial processing and setup of the Object.", "is_constructor": 1, "class": "Visualizer.Colorer", @@ -382,7 +382,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 267, + "line": 269, "description": "freshColorPalette creates a new copy of\nthe main color scheme and returns it.", "itemtype": "method", "name": "freshColorPalette", @@ -395,7 +395,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 279, + "line": 281, "description": "fixed accepts a keyword, and attempts to use the keyword\nto find a relevant color (e.g. \"positive\" may be \"green\").\n\nIf a valid keyword is passed and a relevant color isn't found,\na color is assigned from the rotating set.", "itemtype": "method", "name": "fixed", @@ -415,7 +415,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 301, + "line": 303, "description": "uniquePalette is a collection of sets of remaining\ncolors. Often it will only have a main set, but some\napplications may have more complex coloring needs.", "itemtype": "property", "name": "uniquePalette", @@ -426,7 +426,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 314, + "line": 316, "description": "_assignedUniq is a collection of sets of used colors\n(accessed by key).\nOften it will only have a main set, but some\napplications may have more complex coloring needs.", "itemtype": "property", "name": "uniquePalette", @@ -437,7 +437,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 328, + "line": 330, "description": "unique is a function used to get a unique color for a\ngiven key within a given set (set defaults to \"main\").\n\nThis function has helper properties to handle assigning\nand unassigning colors, determining what the next color\nwill be, and so on.", "todo": [ "consider refactoring / making an Object instead of Function\n(Sorry for the currently complex code)" @@ -467,7 +467,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 354, + "line": 356, "description": "_setUniqueProps sets up the helper sub-functions on the `unique` function.\n\nThis is complex, but allows the following syntax style:\n\n```javascript\n colorer.unique(\"Dylan\") => undefined\n colorer.unique.next() => \"green\"\n\n colorer.unique.assign(\"Dylan\") => undefined\n colorer.unique(\"Dylan\") => \"green\"\n colorer.unique.next() => \"purple\"\n\n colorer.unique.unassign(\"Dylan\") => undefined\n colorer.unique(\"Dylan\") => undefined\n```", "itemtype": "method", "name": "_setUniqueProps", @@ -482,7 +482,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 377, + "line": 379, "description": "unique.next returns the next available color which can be\nassigned to a key.", "itemtype": "method", "name": "unique.next", @@ -504,7 +504,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 395, + "line": 397, "description": "unique.assign attempts to assign a color to a key within a color set.", "itemtype": "method", "name": "unique.assign", @@ -531,7 +531,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 417, + "line": 419, "description": "unique.unassign attempts to unassign a color to a key within a color set.\nThe color is returned to the palette so that it may be reused later.", "itemtype": "method", "name": "unique.unassign", @@ -558,7 +558,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 446, + "line": 448, "description": "unique.resetSet removes colors from all keys within the given set,\nand also replenishes the palette.", "itemtype": "method", "name": "unique.resetSet", @@ -578,7 +578,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 461, + "line": 463, "description": "unique._prepareSet creates and prepares a color set if it doesn't yet exist.", "itemtype": "method", "name": "unique._prepareSet", @@ -598,7 +598,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 477, + "line": 479, "description": "_defaultAssigned is the default color to use for highlighting an item\n(when no other colors in the scheme apply - such as when you\nwish to have unique colors per-key but have no more colors available)", "itemtype": "property", "name": "_defaultAssigned", @@ -608,7 +608,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 487, + "line": 489, "description": "_defaultUnassigned is the default color to use for\nnon-highlighted, but still colored, items.", "itemtype": "property", "name": "_defaultUnassigned", @@ -618,7 +618,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 496, + "line": 498, "description": "_colorScheme is a collection of colors used in the visualization.", "itemtype": "property", "name": "_colorScheme", @@ -628,7 +628,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 508, + "line": 510, "description": "_rotating_color returns an assigned color for a given key\nif available, otherwise assigns a color from the _colorScheme\n(unlike unique(), if all colors are used up, it\nstarts from the first color again.)", "itemtype": "method", "name": "_rotating_color", @@ -648,7 +648,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 534, + "line": 536, "description": "_fixedVals is a collection of key => color pairs for\ncommonly used keys", "itemtype": "property", "name": "_fixedVals", @@ -659,7 +659,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 581, + "line": 583, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -670,7 +670,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 590, + "line": 592, "description": "identifier is a string identifier uniquie to this instance of a Scene", "itemtype": "property", "name": "identifier", @@ -681,7 +681,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 599, + "line": 601, "description": "title is simply a title for the scene, which some\nVisualizer applications may find useful for guiding users.", "itemtype": "property", "name": "title", @@ -692,7 +692,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 609, + "line": 611, "description": "description is simply a description of the scene, which some\nVisualizer applications may find useful for describing a scene to users.", "itemtype": "property", "name": "description", @@ -703,8 +703,8 @@ }, { "file": "build/js/j-visualizer.js", - "line": 619, - "description": "drawWait is the debounce time waited before updating the scene.\nIf a scene's reload is requested many times in rapid succession it will wait\nuntil drawWait milliseconds after the last call before executing the reload.", + "line": 621, + "description": "drawWait is the debounce time waited before running a single widget's update.\nIf a widget's reload is requested many times in rapid succession it will wait\nuntil drawWait milliseconds after the last call before executing the reload.", "itemtype": "property", "name": "drawWait", "type": "Integer (milliseconds)", @@ -715,7 +715,19 @@ }, { "file": "build/js/j-visualizer.js", - "line": 631, + "line": 633, + "description": "fullRefreshWait is an additional debounce time waited before\ntotally updating the scene. This adds some", + "itemtype": "property", + "name": "fullRefreshWait", + "type": "Integer (milliseconds)", + "default": "20", + "required": 1, + "class": "Visualizer.Scene", + "namespace": "Visualizer" + }, + { + "file": "build/js/j-visualizer.js", + "line": 644, "description": "widgets references a collection of \"widget\" Objects, each of which\nshould reference a Module, a ModuleView, an operation to call upon the ModuleView,\nand any additional parameters required (specifications for the ModuleView to follow).", "itemtype": "property", "name": "widgets", @@ -726,7 +738,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 644, + "line": 657, "description": "requestedModuleViews is a computed property that returns\na dictionary of Modules -> ModuleViews , used to determine which views will be\nused by the scene. This is particularly useful when changing scenes to determine\nwhich Views need to be cleared out, and which will be used in the next scene.\n\nUsed as a searchable dictionary: `requestedModuleViews[moduleA][moduleViewA] => true`", "itemtype": "property", "name": "requestedModuleViews", @@ -736,7 +748,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 667, + "line": 680, "description": "clearUnusedViews sends a \"clear\" request to each ModuleView used by the current\ninstance of Visualizer, which isn't used in any of this scene's widgets.\nIn essence it ensures that any Views that are not currently in use are cleansed.", "itemtype": "method", "name": "clearUnusedViews", @@ -749,7 +761,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 701, + "line": 708, "description": "runWidgets iterated this scene's widgets, and requests that the ModuleView specified\nfor each widget executes the operation specified for each widget.\n\nFor example, it may tell one ModuleView, a word cloud, to draw itself, and\nanother ModuleView, a set of icons, to group themselves by common-words.", "itemtype": "method", "name": "runWidgets", @@ -762,7 +774,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 725, + "line": 745, "description": "reload initiates the process of updating the visualization by cleaning out old Views\nand updating all current widgets.\n\nPrevents rapid-exectuion by delaying each request by an amount of time specified\n by property drawWait, and afterward only using the most recent request (as a debounce).", "itemtype": "method", "name": "reload", @@ -775,7 +787,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 762, + "line": 782, "description": "loaded is a boolean variable indicating whether or the world is\nprepared to hold a visualization.\n\nCurrently it simply check's whether the world JQuery object exists", "itemtype": "property", "name": "loaded", @@ -785,7 +797,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 773, + "line": 793, "description": "$ is a method which returns the world's JQuery Object, worldObj.\nIf a parameter is passed, $ will attempt to find that parameter\nwithing the structure of the worldObj.", "itemtype": "method", "name": "$", @@ -805,7 +817,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 790, + "line": 810, "description": "resize recalculates the width, height, top, and left properties of the\nworldObj DOM Element\n\nThis method is automatically called when a World is created.", "itemtype": "method", "name": "resize", @@ -818,7 +830,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 813, + "line": 833, "description": "_bindGlobalEvents binds this World's resize event to the window's resize,\nsuch that every time the window's size changes this World attempts to\nupdate its properties to reflect the new window.\n\nPrivate, since this method is automatically called when a World is created.", "itemtype": "method", "name": "_bindGlobalEvents", @@ -833,7 +845,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 832, + "line": 852, "description": "_bindWorldEvents binds and generic event listeners that\noccur within the World's domain\n\nPrivate, since this method is automatically called when a World is created\nas well as when the worldObj changes to reference a new area.", "itemtype": "method", "name": "_bindWorldEvents", @@ -848,7 +860,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 850, + "line": 870, "description": "injectDefaultWorld clears out the Visualizer World's contents, injects the basic\nvisualizer skeleton", "deprecated": true, "deprecationMessage": "@todo Deprecate this. ModuleViews should take care of this on a per-App basis...", @@ -863,7 +875,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 870, + "line": 890, "description": "_handlePhasedButtonClick is called when an element with class phasedButton\nis clicked. Adds a class 'disabledItem' to the element for 2 seconds;\nif the element is clicked again before the class 'disabledItem' class expires,\nthe click will be ignored.", "itemtype": "method", "name": "_handlePhasedButtonClick", @@ -878,7 +890,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 896, + "line": 916, "description": "removeInstancesOf removes traces of a provided value from an Array", "itemtype": "method", "name": "removeInstancesOf", @@ -897,7 +909,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 920, + "line": 940, "description": "shuffleVals - Fisher-Yates algorithm for shuffling arrays\nin-place. (Essentially goes through each slot in array and\nswitches its value with one from a random slot...)", "itemtype": "method", "name": "shuffleVals", @@ -910,7 +922,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 950, + "line": 970, "description": "values takes an Object and returns its values\n(similar to `.keys()`)", "itemtype": "method", "name": "values", @@ -923,7 +935,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 972, + "line": 992, "description": "addExpiringClass adds a temporary class to a JQuery object.\nThe class has an expiry, after which it is removed.", "itemtype": "method", "name": "addExpiringClass", @@ -952,7 +964,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1005, + "line": 1025, "description": "truncateTo ensures a string is no longer than a given size limit.\n(In the case that it is longer, a suffix can be given for truncation)", "itemtype": "method", "name": "truncateTo", @@ -979,7 +991,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1034, + "line": 1054, "description": "advancedIndexOf searches the object String for a parameter\nsubstring, allows additional options (such as case-insensitivity).", "itemtype": "method", "name": "advancedIndexOf", @@ -1005,7 +1017,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1061, + "line": 1081, "description": "includes searches the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "includes", @@ -1032,7 +1044,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1081, + "line": 1101, "description": "beginsWith searches the start of the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "beginsWith", @@ -1059,7 +1071,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1101, + "line": 1121, "description": "capitalizeLetter is a String capitalize function adapted from\nhttp://stackoverflow.com/a/3291856/624590 .\nCapitalizes the letter at position n of the object String.", "itemtype": "method", "name": "capitalizeLetter", @@ -1081,7 +1093,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1123, + "line": 1143, "description": "titleize creates a title-formatted copy of a String", "itemtype": "method", "name": "titleize", @@ -1094,7 +1106,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1139, + "line": 1159, "description": "removeInitialUnderscore removes the first leading underscore from a String", "itemtype": "method", "name": "removeInitialUnderscore", @@ -1107,7 +1119,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1168, + "line": 1188, "description": "existsWithValue checks if a values isn't null/undefined", "itemtype": "method", "name": "existsWithValue", @@ -1127,7 +1139,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1179, + "line": 1199, "description": "waitForRepeatingEvents is a debounce-like function for preventing\nmultiple execution. It should be called with a function and an\namount of time to wait. It can also be provided a timer name so as\nto namespace the blocked items. It can also be called with an Object\ntimer set to allow different objects to not prevent the execution of\nfunctions in others.", "itemtype": "method", "name": "waitForRepeatingEvents", @@ -1162,7 +1174,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1211, + "line": 1231, "description": "minVal takes two parameters, returns the smaller", "itemtype": "method", "name": "minVal", @@ -1187,7 +1199,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1227, + "line": 1247, "description": "maxVal takes two parameters, returns the larger", "itemtype": "method", "name": "maxVal", @@ -1212,7 +1224,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1243, + "line": 1263, "description": "boundedVal takes three parameters: an item, the lower bound,\nand the upper bound. If the item is between the bounds,\nthe item is returned, otherwise the failed bound is returned.", "itemtype": "method", "name": "boundedVal", @@ -1242,7 +1254,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1264, + "line": 1284, "description": "randBetween provides a random number between two values.", "itemtype": "method", "name": "randBetween", @@ -1271,7 +1283,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1282, + "line": 1302, "description": "randIntBetween provides a random (rounded) Integer between two values.", "itemtype": "method", "name": "randIntBetween", @@ -1296,7 +1308,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1294, + "line": 1314, "description": "isArray returns a flag of whether the parameter is of type Array", "itemtype": "method", "name": "isArray", @@ -1316,7 +1328,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1305, + "line": 1325, "description": "relativeSizeString parses an input size for either an explicit\nvalue, or a value in relationship to some parent value.\nE.g. \"50%\" of 900 = 450, \"50\" = 50, \"50px\" = 50", "itemtype": "method", "name": "relativeSizeString", @@ -1341,7 +1353,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1325, + "line": 1345, "description": "intersectionSafe is simple intersection code, iterates along two\nsorted arrays incrementing the index of the smaller value\n(if values are equal, it is part of intersection, and so store position and iterate both).\nReturns array of indices of intersecting values with respect to the first array passed.\n\nintersectionSafe is modified from code found on StackOverflow at:\nhttp://stackoverflow.com/a/1885660/624590", "itemtype": "method", "name": "intersectionSafe", @@ -1366,7 +1378,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1358, + "line": 1378, "description": "intersectionCount is a modified form of intersectionSafe that simply\nincrements a counter instead of building an intersection Array.\n(Faster because increments rather than pushing values to array,\nalso more memory efficient; JSPerf suggests 100% performance increase\n- beneficial for large datasets...)", "itemtype": "method", "name": "intersectionCount", @@ -1391,7 +1403,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1389, + "line": 1409, "description": "cloneArray creates a copy of an Array.", "deprecated": true, "deprecationMessage": "use Array.copy instead.", @@ -1413,7 +1425,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1491, + "line": 1511, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1424,7 +1436,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1500, + "line": 1520, "description": "maxLength is an integer size of how much data should be displayed.\nSometimes a project will collect more data than is practical to display\nto the user (either because it will be confusing, or otherwise too slow);\nthis property represents that limit.", "itemtype": "property", "name": "maxLength", @@ -1435,7 +1447,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1512, + "line": 1532, "description": "content is the full set of data (in Array , Ember.Array) form that is\navailable to this Module.\n\nNote: this attribute should only be accessed from the\ndata-management side of your app; it's where you dump data, and it's\nwhat you generally access for front-end filtering. This Module's\nModuleViews should not access the content, however - they should access\nthe dataset (which is a subset of content).", "itemtype": "property", "name": "content", @@ -1446,7 +1458,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1530, + "line": 1550, "description": "dataset is the subset of content used for current visualization.\nIt can potentially be the exact same data as content, in full,\nbut it can also be a limited/truncated version (often using the\nmaxLength property). It may also filtered down by properties, etc.\n\nModuleViews should only look here for their Module data.", "itemtype": "property", "name": "dataset", @@ -1457,7 +1469,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1545, + "line": 1565, "description": "moduleViews an object dictionary/map of Visualizer ModuleView objects,\neach of which must be relevant to this particular Module's data structuring.\n\nFor example, if this Module is a set of words with frequencies, a WordCloud\nmay be an applicable ModuleView.", "itemtype": "property", "name": "moduleViews", @@ -1468,7 +1480,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1560, + "line": 1580, "description": "init is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", "is_constructor": 1, "class": "Visualizer.Module", @@ -1476,7 +1488,20 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1576, + "line": 1596, + "description": "requestRedraw sends a request to the current scene\nto redraw the widgets relevant to this module (and no others).", + "itemtype": "method", + "name": "requestRedraw", + "return": { + "description": "", + "type": "Void" + }, + "class": "Visualizer.Module", + "namespace": "Visualizer" + }, + { + "file": "build/js/j-visualizer.js", + "line": 1612, "description": "forceLimit sorts the current data by a provided key, and selects only the\nfirst maxLength (property) items for this Module's dataset, ensuring that\nthe limit to the viewed-data's size is enforced.", "todo": [ "consider implementing a n-item max-heap data structure instead of sorting" @@ -1501,7 +1526,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1598, + "line": 1634, "description": "groupedBy creates a cached property on the Module to retrieve its data\nin the form of a two-dimensional Array, where the sub arrays contain\nthis Module's dataset split into sets that share a common (passed) property.\n\nThe outside Array is sorted by length, so the largest groups are at the start.\n\nSince the result is cached, it will only be recomputed when the dataset changes,\nkeeping this efficient. The first time you use groupBy for any given property\nafter the data changes (or is created) runs O(nlogn), but each subsequent access\nis simply O(1) as it simply grabs the previous data. Say what??? :P", "itemtype": "method", "name": "groupedBy", @@ -1521,7 +1546,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1630, + "line": 1666, "description": "_groupedBy groups the Module's dataset by a given property, returning\nan unsorted, two-dimensional array.\n\nThis method should not be called explicitly, instead developers should\ngo through the `groupedBy` method (no leading underscore), which\ncaches the groups (making redraws far more efficient)", "itemtype": "method", "name": "_groupedBy", @@ -1541,7 +1566,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1673, + "line": 1709, "description": "module is a reference to the parent Module for this ModuleView instance.", "itemtype": "property", "name": "module", @@ -1552,7 +1577,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1682, + "line": 1718, "description": "containerSelector is a string CSS selector used for finding\nthis ModuleView's window in a Visualization.\n\nOften unique, but occasionally multiple ModuleViews will be\nwritten to share a container.\n\nOften this property will be specified in a widget's parameters,\notherwise child classes to ModuleView should specify defaults.\nIf a widget does specify a `container` param, it will be set and used\nrunning any operation.", "itemtype": "property", "name": "containerSelector", @@ -1563,7 +1588,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1700, + "line": 1736, "description": "previousSelectors is a list history of selectors that were\npreviously set as this instance of a ModuleView's containerSelector.\n\nThis may be useful for navigation, or for cleaning up after a visualization.", "itemtype": "property", "name": "previousSelectors", @@ -1573,7 +1598,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1713, + "line": 1749, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1584,7 +1609,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1722, + "line": 1758, "description": "data is a reference to the visible data for visualization.", "itemtype": "property", "name": "data", @@ -1595,7 +1620,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1731, + "line": 1767, "description": "arrangedContent is a reference to all Module data (sorted/arranged).\nThis property should only seldom be accessed because it includes\ndata which is deemed irrelevant by the Module (filtered, etc.)\n\nIt may, however, be useful if a View decides to animate old data away\nupon filtering / limiting its viewable data.", "itemtype": "property", "name": "arrangedContent", @@ -1606,7 +1631,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1745, + "line": 1781, "description": "dimensionsDidChange is a flag used by ModuleViews to decide how much\nprocessing is required when they run an operation.\n\nIf all dimensions, including visible data, width, and height, are\nunchanged, often times the old Visualization can simply be shown.\n\nSet to true by default, so that ModuleViews can have a proper first-draw.", "itemtype": "property", "name": "dimensionsDidChange", @@ -1616,7 +1641,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1759, + "line": 1795, "description": "init is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", "is_constructor": 1, "class": "Visualizer.ModuleView", @@ -1624,7 +1649,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1772, + "line": 1808, "description": "clear cleanses/hides the current ModuleView from the visualization.\n\nThis method is often called when a widget representing the ModuleView\nleaves a visualization (either being removed from a scene,\nor not being part of a new scene.)\n\nEach ModuleView should implement/override this, and should\nprovide (at least) the following functionality:\n - hide the container/elements (to prevent overlap/event-disruption),\n - unset isDrawn so that next time we know to fully redraw, etc.\n\nOptionally, it should also empty the DOM Node/SVG to save memory", "itemtype": "method", "name": "clear", @@ -1637,7 +1662,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1791, + "line": 1827, "description": "destroy totally removes the current ModuleView from the visualization.\nThis should entirely empty and remove any DOM-or-SVG Elements from the\ndocument.\n\nThis method is rarely called unless the Visualizer is being removed entirely.\n\nEach ModuleView should implement/override this function.", "itemtype": "method", "name": "destroy", @@ -1650,7 +1675,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1807, + "line": 1843, "description": "run is used used to execute a widget's operation on a ModuleView.\nMany times additional parameters are passed, these assist in updating a\nModuleView by providing the widget's specifications (container, width,\nany data limitations, etc.)\n\nIf params includes a `container` key, its value will be used to define\nthis particular ModuleView's container viewport.", "itemtype": "method", "name": "run", @@ -1676,7 +1701,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1832, + "line": 1868, "description": "updateSelector takes a new containerSelector parameter, and uses it to\nchange this ModuleView's viewport. It also updates the `previousSelectors`\nhistory to contain the selector that was used before this method was called.", "itemtype": "method", "name": "updateSelector", @@ -1696,7 +1721,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1850, + "line": 1886, "description": "$container is a method which returns the ModuleView's container/viewport\nJQuery Object.\n\nIf a parameter is passed, $container will attempt to find that parameter\nwithing the structure of its container object.", "itemtype": "method", "name": "$container", @@ -1717,7 +1742,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1867, + "line": 1903, "description": "hardReset clears out the ModuleView and tells it that dimensionsDidChange,\nso the next redraw/execution is a fresh one (fully recalculated).\n\nThis is automatically called when the ModuleView's data changes.", "itemtype": "method", "name": "hardReset", @@ -1730,7 +1755,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1881, + "line": 1917, "description": "widgetParamedOutlineCSS provides an Object where keys/values map to CSS attributes\nrelevant to the container ONLY for manually specified dimensions/positions.\n\nThe point of this method is to provide access to data that can be used to set the\nstyle of the DOM element containing this ModuleView to the manually-set specifications.\n\nIf a developer opts to simply use a container's size/position, this will return an\nempty object.", "itemtype": "method", "name": "widgetParamedOutlineCSS", @@ -1751,7 +1776,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1911, + "line": 1947, "description": "width getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "width", @@ -1778,7 +1803,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1925, + "line": 1961, "description": "height getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "height", @@ -1805,7 +1830,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1939, + "line": 1975, "description": "_updateDimension is used when setting width or height.\nIt accepts a key (which should be set to \"width\" or \"height\"),\nand a value.\n\nThe value is rounded down to the nearest integer to keep the DOM clean,\nand to keep determining changes simple.\n\nIf the value isn't the same as this ModuleView's previous value for the\nsame key property, dimensionsDidChange flag will be set true so that the\nModuleView knows to perform its next operation with full calculations.", "itemtype": "method", "name": "_updateDimension", @@ -1832,7 +1857,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1968, + "line": 2004, "description": "_presetContainerAttrs is used when running an operation to ensure that\nrequired attributes based on the viewport (such as available width/height)\nfor visualization are set.\n\nIf width or height are manually specified, this will not update that attribute -\nin these cases, the ModuleView should know how to handle explicit dimensions.\nThe \"resizable mixin\" can help with this (more details in _resizable_mixin file)", "itemtype": "method", "name": "_presetContainerAttrs", @@ -1853,7 +1878,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2015, + "line": 2051, "description": "run hijacks the ModuleView's run method to first attempt to update\nthe viewport's size based on the parameter specifications.\nAfter attempting to update the size/position of the viewport,\nthe ModuleView's run function is allowed to proceed.", "itemtype": "method", "name": "run", @@ -1879,7 +1904,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2034, + "line": 2070, "description": "_updateSize scans the widget-sent params for manually-set\nsize/position values, uses these to set up the ModuleView's\nrelevant attributes.", "itemtype": "method", "name": "_updateSize", @@ -1902,7 +1927,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2071, + "line": 2107, "description": "_tryUpdateValue given a sizing/position-defining key and value,\nthis method attempts to parse the value and, if it's a relative\npercentage or String, coerce it to an integer.\n\nAllows values to be explicit (e.g. 50, or \"50px\"), or relative\nto the Visualizer's World (e.g. \"50%\"). Parameter relativeReq is\nused to specify which of the World's parameters should be used to\ndetermine a relative size (e.g. \"left\" uses the World's \"width\").\n\nparams may also specify an amount of padding.", "itemtype": "method", "name": "_tryUpdateValue", @@ -1952,15 +1977,15 @@ }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Colorer Object.\nIt is responsible for the initial processing and setup of the Object.", - "line": " build/js/j-visualizer.js:255" + "line": " build/js/j-visualizer.js:257" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", - "line": " build/js/j-visualizer.js:1560" + "line": " build/js/j-visualizer.js:1580" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", - "line": " build/js/j-visualizer.js:1759" + "line": " build/js/j-visualizer.js:1795" } ] } \ No newline at end of file diff --git a/documentation/files/build_js_j-visualizer.js.html b/documentation/files/build_js_j-visualizer.js.html index 24309a1..297f917 100644 --- a/documentation/files/build_js_j-visualizer.js.html +++ b/documentation/files/build_js_j-visualizer.js.html @@ -240,14 +240,16 @@

    File: build/js/j-visualizer.js

    * @return {void} */ addModule: function(moduleClass, moduleKey, content) { - this.set("modules." + moduleKey, moduleClass.create({ + var module; + module = moduleClass.create({ visualizer: this, key: moduleKey - })); + }); + this.set("modules." + moduleKey, module); if (content != null) { this.set("modules." + moduleKey + ".content", content); } - return this.refresh(); + return module.requestRedraw(); }, /** @@ -725,8 +727,8 @@

    File: build/js/j-visualizer.js

    description: null, /** - * drawWait is the debounce time waited before updating the scene. - * If a scene's reload is requested many times in rapid succession it will wait + * drawWait is the debounce time waited before running a single widget's update. + * If a widget's reload is requested many times in rapid succession it will wait * until drawWait milliseconds after the last call before executing the reload. * * @property drawWait @@ -736,6 +738,17 @@

    File: build/js/j-visualizer.js

    */ drawWait: 100, + /** + * fullRefreshWait is an additional debounce time waited before + * totally updating the scene. This adds some + * + * @property fullRefreshWait + * @type Integer (milliseconds) + * @default 20 + * @required + */ + fullRefreshWait: 20, + /** * widgets references a collection of "widget" Objects, each of which * should reference a Module, a ModuleView, an operation to call upon the ModuleView, @@ -781,29 +794,23 @@

    File: build/js/j-visualizer.js

    * @return {void} */ clearUnusedViews: function() { - var module, moduleName, view, viewName, _ref, _results; + var module, moduleName, view, viewName, _ref, _ref1; _ref = this.get("visualizer.modules"); - _results = []; for (moduleName in _ref) { if (!__hasProp.call(_ref, moduleName)) continue; module = _ref[moduleName]; - _results.push((function() { - var _ref1, _results1; - _ref1 = module.get('moduleViews'); - _results1 = []; - for (viewName in _ref1) { - if (!__hasProp.call(_ref1, viewName)) continue; - view = _ref1[viewName]; - if (!this.get("requestedModuleViews." + moduleName + "." + viewName)) { - _results1.push(typeof view.clear === "function" ? view.clear() : void 0); - } else { - _results1.push(void 0); + _ref1 = module.get('moduleViews'); + for (viewName in _ref1) { + if (!__hasProp.call(_ref1, viewName)) continue; + view = _ref1[viewName]; + if (!this.get("requestedModuleViews." + moduleName + "." + viewName)) { + if (typeof view.clear === "function") { + view.clear(); } } - return _results1; - }).call(this)); + } } - return _results; + return this; }, /** @@ -817,17 +824,30 @@

    File: build/js/j-visualizer.js

    * @return {void} */ runWidgets: function(widgets) { - var moduleView, widget, _i, _len, _results; + var widget, _i, _len; if (widgets == null) { widgets = this.get('widgets'); } - _results = []; for (_i = 0, _len = widgets.length; _i < _len; _i++) { widget = widgets[_i]; - moduleView = this.get("visualizer.modules." + widget.module + ".moduleViews." + widget.view); - _results.push(moduleView != null ? moduleView.run(widget.operation, widget.params) : void 0); + this._runWidget(widget); } - return _results; + return this; + }, + _runWidget: function(widget) { + var viewIdentifier; + if (widget == null) { + widget = {}; + } + viewIdentifier = "visualizer.modules." + widget.module + ".moduleViews." + widget.view; + Visualizer.Utils.waitForRepeatingEvents(((function(_this) { + return function() { + var moduleView; + moduleView = _this.get(viewIdentifier); + return moduleView != null ? moduleView.run(widget.operation, widget.params) : void 0; + }; + })(this)), this.get("drawWait"), "Scene Redraw for " + viewIdentifier, this.get('visualizer.timers')); + return this; }, /** @@ -846,7 +866,7 @@

    File: build/js/j-visualizer.js

    _this.clearUnusedViews(); return _this.runWidgets(); }; - })(this)), this.get("drawWait"), "Scene Reload", this.get('visualizer.timers')); + })(this)), this.get('fullRefreshWait'), "Full Scene Reload", this.get('visualizer.timers')); } }); @@ -1681,6 +1701,22 @@

    File: build/js/j-visualizer.js

    return typeof this.setDefaultViews === "function" ? this.setDefaultViews() : void 0; }, + /** + * requestRedraw sends a request to the current scene + * to redraw the widgets relevant to this module (and no others). + * + * @method requestRedraw + * @return {void} + */ + requestRedraw: function() { + var key, scene, _ref; + scene = this.get('visualizer.currentScene'); + key = this.get('key'); + if ((scene != null) && (key != null)) { + return scene.runWidgets((_ref = scene.get('widgets')) != null ? _ref.filterBy('module', key) : void 0); + } + }, + /** * forceLimit sorts the current data by a provided key, and selects only the * first maxLength (property) items for this Module's dataset, ensuring that diff --git a/spec/fixtures/vis_fixtures.js b/spec/fixtures/vis_fixtures.js index a98dda1..a31902b 100644 --- a/spec/fixtures/vis_fixtures.js +++ b/spec/fixtures/vis_fixtures.js @@ -28,6 +28,7 @@ visSpecFixtures.specModule = Visualizer.Module.extend({ visSpecFixtures.specScenes = [ { identifier: "1", + fullRefreshWait: 10, widgets: [{ module: "0", view: "specView", @@ -43,6 +44,7 @@ visSpecFixtures.specScenes = [ { identifier: "2", drawWait: 10, + fullRefreshWait: 10, widgets: [{ module: "1", view: "specView", diff --git a/spec/modules/modules_spec.js b/spec/modules/modules_spec.js index 1752a3f..a83e060 100644 --- a/spec/modules/modules_spec.js +++ b/spec/modules/modules_spec.js @@ -99,4 +99,24 @@ test('groupedBy', function() { var thirdGroupedReduced = thirdGroupedFetch[0].reduce(reduceFunc, ''); ok(['13', '31'].indexOf(thirdGroupedReduced) > -1, "Since none of the first group's types \ really changed, the groups are the same."); -}); \ No newline at end of file +}); + +// requestRedraw +asyncTest('requestRedraw', 2, function() { + var _specWait = (_vis.get('currentScene.drawWait') + _vis.get('currentScene.fullRefreshWait')) * 1.1; + var redrawModule = _vis.get('modules.0'); + var ignoredModule = _vis.get('modules.2'); + var _viewVal = 'moduleViews.specView.val'; + + Ember.run.later(this, function () { + var prevRedrawModuleVal = redrawModule.get(_viewVal); + var prevIgnoredModuleVal = ignoredModule.get(_viewVal); + + redrawModule.requestRedraw(); + Ember.run.later(this, function () { + equal(redrawModule.get(_viewVal), prevRedrawModuleVal+1, "The test module view value has been incremented"); + equal(ignoredModule.get(_viewVal), prevIgnoredModuleVal, "The unrelated module's view value is unchanged."); + start(); + }, _specWait); + }, _specWait); +}); diff --git a/spec/vis_scene/vis_scene_spec.js b/spec/vis_scene/vis_scene_spec.js index 8156ea5..64a13fa 100644 --- a/spec/vis_scene/vis_scene_spec.js +++ b/spec/vis_scene/vis_scene_spec.js @@ -8,7 +8,7 @@ module("Visualizer.Scene Unit Test", { _vis = getSpecVisualizer(); _defaultScene = _vis.get('currentScene'); _specDrawWait = 30; - _specWait = (_specDrawWait*1.1); + _specWait = (_specDrawWait + _defaultScene.get('fullRefreshWait'))*1.1; }, /** @@ -45,34 +45,41 @@ test('requestedModuleViews', function() { }); + // drawWait -asyncTest('drawWait', 3, function() { +// default value: +test('drawWait default', function() { var _defaultWaitTime = 100; - - var initialValue = _vis.get('modules.0.moduleViews.specView.val'); equal(_defaultScene.get('drawWait'), _defaultWaitTime, "default drawWait time is 100"); +}); - // Let's tone down the drawWait value to make the tests run more quickly... - _defaultScene.set('drawWait', _specDrawWait) +// drawWait is used: +asyncTest('drawWait is used', 2, function() { + Ember.run.later(this, function () { // Allow the initial run (when adding the module) to occur first... - _defaultScene.reload(); - _defaultScene.reload(); // Repeated call! - _defaultScene.reload(); // Repeated call! - _defaultScene.reload(); // Repeated call! + var initialValue = _vis.get('modules.0.moduleViews.specView.val'); + // Let's tone down the drawWait value to make the tests run more quickly... + _defaultScene.set('drawWait', _specDrawWait) - Ember.run.later(this, function () { - var newValue = _vis.get('modules.0.moduleViews.specView.val'); - equal(newValue, initialValue+1, "Although reload was called four times in succession, \ - only one triggered because drawWait time hadn't passed"); + _defaultScene.reload(); + _defaultScene.reload(); // Repeated call! + _defaultScene.reload(); // Repeated call! + _defaultScene.reload(); // Repeated call! - _defaultScene.reload(); // Try reloading again again... Ember.run.later(this, function () { - var finalValue = _vis.get('modules.0.moduleViews.specView.val'); - equal(finalValue, newValue+1, "However, it can be reloaded again after the drawWait time passes."); + var newValue = _vis.get('modules.0.moduleViews.specView.val'); + equal(newValue, initialValue+1, "Although reload was called four times in succession, \ + only one triggered because drawWait time hadn't passed"); - start(); - }, _specWait); + _defaultScene.reload(); // Try reloading again again... + Ember.run.later(this, function () { + var finalValue = _vis.get('modules.0.moduleViews.specView.val'); + equal(finalValue, newValue+1, "However, it can be reloaded again after the drawWait time passes."); + start(); + }, _specWait); + + }, _specWait); }, _specWait); }); @@ -83,33 +90,35 @@ asyncTest('drawWait', 3, function() { // Any widget that gets cleared (leaves a scene) results in a value of 0. */ asyncTest('reload (runWidgets and clear)', 6, function() { - var getViewValues = function(){ - return { - 0: _vis.get('modules.0.moduleViews.specView.val'), - 1: _vis.get('modules.1.moduleViews.specView.val'), - 2: _vis.get('modules.2.moduleViews.specView.val'), + Ember.run.later(this, function () { // Allow the initial run (when adding the module) to occur first... + var getViewValues = function(){ + return { + 0: _vis.get('modules.0.moduleViews.specView.val'), + 1: _vis.get('modules.1.moduleViews.specView.val'), + 2: _vis.get('modules.2.moduleViews.specView.val'), + }; }; - }; - var initialValues = getViewValues(); - // Let's tone down the drawWait value to make the tests run more quickly... - _defaultScene.set('drawWait', _specDrawWait) - _defaultScene.reload(); - Ember.run.later(this, function () { - var newValues = getViewValues(); - equal(newValues[0], initialValues[0]+1, "View 0 incremented"); - equal(newValues[2], initialValues[2]+2, "View 2 increased by 2 (using the params)"); // Tests that params work, too! - equal(newValues[1], 0, "View 1 value was cleared!"); - - // Switch scenes, wait for the automatic reload: - _vis.setScene('2'); + var initialValues = getViewValues(); + // Let's tone down the drawWait value to make the tests run more quickly... + _defaultScene.set('drawWait', _specDrawWait) + _defaultScene.reload(); Ember.run.later(this, function () { - var finalValues = getViewValues(); - equal(finalValues[1], newValues[1]+1, "View 1 value was incremented"); - equal(finalValues[0], 0, "View 0 was cleared!"); - equal(finalValues[2], 0, "View 2 was cleared!"); + var newValues = getViewValues(); + equal(newValues[0], initialValues[0]+1, "View 0 incremented"); + equal(newValues[2], initialValues[2]+2, "View 2 increased by 2 (using the params)"); // Tests that params work, too! + equal(newValues[1], 0, "View 1 value was cleared!"); + + // Switch scenes, wait for the automatic reload: + _vis.setScene('2'); + Ember.run.later(this, function () { + var finalValues = getViewValues(); + equal(finalValues[1], newValues[1]+1, "View 1 value was incremented"); + equal(finalValues[0], 0, "View 0 was cleared!"); + equal(finalValues[2], 0, "View 2 was cleared!"); + + start(); + }, _specWait); - start(); }, _specWait); - }, _specWait); }); diff --git a/src/j_visualizer.js.coffee b/src/j_visualizer.js.coffee index 21f515d..5edcfdc 100644 --- a/src/j_visualizer.js.coffee +++ b/src/j_visualizer.js.coffee @@ -111,9 +111,10 @@ # @return {void} ### addModule: (moduleClass, moduleKey, content) -> - @set("modules.#{moduleKey}", moduleClass.create({visualizer: this, key: moduleKey})) + module = moduleClass.create({visualizer: this, key: moduleKey}) + @set("modules.#{moduleKey}", module) @set("modules.#{moduleKey}.content", content) if content? - @refresh() + module.requestRedraw() ###* # refresh sends a request to the current scene to update the visualization diff --git a/src/modules/_visualizer_module.js.coffee b/src/modules/_visualizer_module.js.coffee index 3a69017..e3e57f5 100644 --- a/src/modules/_visualizer_module.js.coffee +++ b/src/modules/_visualizer_module.js.coffee @@ -92,6 +92,19 @@ init: -> @setDefaultViews?() + ###* + # requestRedraw sends a request to the current scene + # to redraw the widgets relevant to this module (and no others). + # + # @method requestRedraw + # @return {void} + ### + requestRedraw: ()-> + scene = @get('visualizer.currentScene') + key = @get('key') + if scene? and key? + scene.runWidgets scene.get('widgets')?.filterBy('module', key) + ###* # forceLimit sorts the current data by a provided key, and selects only the # first maxLength (property) items for this Module's dataset, ensuring that diff --git a/src/vis_scene.js.coffee b/src/vis_scene.js.coffee index fe8d6b4..a2780f1 100644 --- a/src/vis_scene.js.coffee +++ b/src/vis_scene.js.coffee @@ -49,8 +49,8 @@ description: null ###* - # drawWait is the debounce time waited before updating the scene. - # If a scene's reload is requested many times in rapid succession it will wait + # drawWait is the debounce time waited before running a single widget's update. + # If a widget's reload is requested many times in rapid succession it will wait # until drawWait milliseconds after the last call before executing the reload. # # @property drawWait @@ -60,6 +60,17 @@ ### drawWait: 100 + ###* + # fullRefreshWait is an additional debounce time waited before + # totally updating the scene. This adds some + # + # @property fullRefreshWait + # @type Integer (milliseconds) + # @default 20 + # @required + ### + fullRefreshWait: 20 + ###* # widgets references a collection of "widget" Objects, each of which # should reference a Module, a ModuleView, an operation to call upon the ModuleView, @@ -96,12 +107,13 @@ # In essence it ensures that any Views that are not currently in use are cleansed. # # @method clearUnusedViews - # @return {void} + # @chainable ### clearUnusedViews: -> for own moduleName, module of @get("visualizer.modules") for own viewName, view of module.get('moduleViews') view.clear?() unless @get("requestedModuleViews.#{moduleName}.#{viewName}") + @ ###* # runWidgets iterated this scene's widgets, and requests that the ModuleView specified @@ -111,12 +123,27 @@ # another ModuleView, a set of icons, to group themselves by common-words. # # @method runWidgets - # @return {void} + # @chainable ### runWidgets: (widgets = @get('widgets')) -> - for widget in widgets - moduleView = @get("visualizer.modules.#{widget.module}.moduleViews.#{widget.view}") + @_runWidget(widget) for widget in widgets + @ + + ###* + # _runWidget runs the current scene's operation for a single widget. + # Waits for repeating events to prevent multiple refreshes on the + # same dimensions/parameters. + # + # @method _runWidget + # @return {void} + # @private + ### + _runWidget: (widget={})-> + viewIdentifier = "visualizer.modules.#{widget.module}.moduleViews.#{widget.view}" + Visualizer.Utils.waitForRepeatingEvents (=> + moduleView = @get(viewIdentifier) moduleView?.run(widget.operation, widget.params) + ), @get("drawWait"), "Scene Redraw for #{viewIdentifier}", @get('visualizer.timers') ###* # reload initiates the process of updating the visualization by cleaning out old Views @@ -132,4 +159,4 @@ Visualizer.Utils.waitForRepeatingEvents (=> @clearUnusedViews() @runWidgets() - ), @get("drawWait"), "Scene Reload", @get('visualizer.timers') + ), @get('fullRefreshWait'), "Full Scene Reload", @get('visualizer.timers') From d467a3911c31ae82dcdf6ea4c33d54250d5948d3 Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Tue, 29 Apr 2014 16:27:47 -0400 Subject: [PATCH 4/7] Include builds for release, and update a few documentation changes. --- .gitignore | 1 - build/j-visualizer.min.js | 1 + build/js/j-visualizer.js | 2162 +++++++++++++++++ documentation/classes/NativeClass.Array.html | 6 +- documentation/classes/NativeClass.String.html | 14 +- documentation/classes/Visualizer.Module.html | 20 +- .../Visualizer.ModuleView.ResizableMixin.html | 8 +- .../classes/Visualizer.ModuleView.html | 38 +- documentation/classes/Visualizer.Scene.html | 100 +- documentation/classes/Visualizer.Utils.html | 26 +- documentation/classes/Visualizer.World.html | 16 +- documentation/classes/jQuery.fn.html | 2 +- documentation/data.json | 157 +- .../files/build_js_j-visualizer.js.html | 42 +- spec/modules/modules_spec.js | 2 +- src/module_views/_module_view.js.coffee | 7 +- src/utils/vis_utils.js.coffee | 3 +- src/vis_scene.js.coffee | 3 +- 18 files changed, 2423 insertions(+), 185 deletions(-) create mode 100644 build/j-visualizer.min.js create mode 100644 build/js/j-visualizer.js diff --git a/.gitignore b/.gitignore index 8ca3b6b..0b01b64 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -build/ node_modules/ spec/bower_components/ diff --git a/build/j-visualizer.min.js b/build/j-visualizer.min.js new file mode 100644 index 0000000..d8dfdfa --- /dev/null +++ b/build/j-visualizer.min.js @@ -0,0 +1 @@ +(function(){var a,b={}.hasOwnProperty;this.Visualizer=a=Ember.Object.extend({world:null,scenes:Ember.computed(function(){return{}}),modules:Ember.computed(function(){return Ember.Object.create()}).property(),associations:Ember.computed(function(){return Ember.Object.create()}).property(),timers:Ember.computed(function(){return{}}),init:function(b){return this.useWorld(b),this.set("color",a.Colorer.create({visualizer:this}))},useWorld:function(b){return this.set("world",a.World.create({worldObj:$(b),visualizer:this}))},injectWorld:function(){return this.get("world").injectDefaultWorld()},addModule:function(a,b,c){var d;return d=a.create({visualizer:this,key:b}),this.set("modules."+b,d),null!=c&&this.set("modules."+b+".content",c),d.requestRedraw()},refresh:function(){var a;return this.get("world.loaded")&&null!=(a=this.get("currentScene"))?a.reload():void 0}.observes("currentScene","world.worldObj","world.loaded","world.width","world.height"),useScenes:function(b){var c,d,e,f;for(null==b&&(b=[]),a.Utils.isArray(b)||("undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Object({})-type input for useScenes is deprecated - please pass an Array instead..."),b=b.visualizer_scenes),f=[],d=0,e=b.length;e>d;d++)c=b[d],c.visualizer=this,f.push(this.set("scenes."+c.identifier,a.Scene.create(c)));return f},setScene:function(a){return this.set("currentScene",this.get("scenes."+a))},destroy:function(){var a,c,d,e;d=this.get("modules"),e=[];for(c in d)b.call(d,c)&&(a=d[c],e.push("function"==typeof a.destroy?a.destroy():void 0));return e}})}).call(this),function(){this.Visualizer.Colorer=Ember.Object.extend({visualizer:null,init:function(){return this.get("_assignedUniq"),this.get("uniquePalette"),this._setUniqueProps()},freshColorPalette:function(){return this.get("_colorScheme").copy()},fixed:function(a){return null==a&&(a=""),null!=a&&(a=""+a.toLowerCase()).length?this.get("_fixedVals."+a)||this._rotating_color(a):this.get("_defaultVal")},uniquePalette:Ember.computed(function(){return{}}),_assignedUniq:Ember.computed(function(){return{}}),unique:function(a,b){return null==a&&(a=""),null==b&&(b="main"),this.get("_assignedUniq."+b+"."+a)},_setUniqueProps:function(){return this.unique.next=function(a){return function(b){return null==b&&(b="main"),a.unique._prepareSet(b),a.get("uniquePalette."+b+".0")}}(this),this.unique.assign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&null==a.unique(b,c)?(d=a.get("uniquePalette."+c).shift()||a.get("_defaultAssigned"),a.set("_assignedUniq."+c+"."+b,d)):void 0}}(this),this.unique.unassign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&(d=a.unique(b,c),null!=d&&d!==a.get("_defaultUnassigned"))?(d!==a.get("_defaultAssigned")&&a.get("uniquePalette."+c).push(d),delete a.get("_assignedUniq."+c)[b],a.get("uniquePalette."+c+".0")):void 0}}(this),this.unique.resetSet=function(a){return function(b){return a.get("_assignedUniq")[b]={},a.get("uniquePalette")[b]=a.freshColorPalette().shuffleVals()}}(this),this.unique._prepareSet=function(a){return function(b){return null==a.get("uniquePalette."+b)?a.unique.resetSet(b):void 0}}(this)},_defaultAssigned:"#5895B2",_defaultUnassigned:"#8da3b0",_colorScheme:["#3498DB","#9B59B6","#F2CA27","#34495E","#1ABC9C","#E74C3C","#95A5A6","#ECF0F1","#2ECC71","#5895B2"],_rotating_color_val:Ember.computed(function(){return{}}),_rotating_keys_used:0,_rotating_color:function(a){var b,c;return null!=a?((b=this.get("_rotating_color_val."+a))||(c=this.get("_colorScheme"),b=c[this._rotating_keys_used++%c.length],this.set("_rotating_color_val."+a,b)),b):void 0},_defaultVal:Ember.computed(function(){var a;return(null!=(a=window.colors)?a.defaultSingle:void 0)||this.get("_defaultAssigned")}),_fixedVals:{blog:"#28cfc5",board:"#FB913F",twitter:"#2AA9E0",facebook:"#4D69A2",google:"#DD4C39",youtube:"#E14D42",instagram:"#FFCB33",linkedin:"#1E87BD",male:"#29A0CE",unisex:"#d6dadb",female:"#FC4482",positive:"#74B81D",negative:"#E74C3C",neutral:"#A8CEE0",unknown:"#d6dadb"}})}.call(this),function(){var a={}.hasOwnProperty;this.Visualizer.Scene=Ember.Object.extend({visualizer:null,identifier:null,title:null,description:null,drawWait:100,fullRefreshWait:20,widgets:Ember.computed(function(){return[]}),requestedModuleViews:function(){var a,b,c,d,e,f,g;for(b={},g=this.get("widgets"),d=0,e=g.length;e>d;d++)c=g[d],a=null!=b[f=c.module]?b[f]:b[f]={},a[c.view]=!0;return b}.property("widgets.@each"),clearUnusedViews:function(){var b,c,d,e,f,g;f=this.get("visualizer.modules");for(c in f)if(a.call(f,c)){b=f[c],g=b.get("moduleViews");for(e in g)a.call(g,e)&&(d=g[e],this.get("requestedModuleViews."+c+"."+e)||"function"==typeof d.clear&&d.clear())}return this},runWidgets:function(a){var b,c,d;for(null==a&&(a=this.get("widgets")),c=0,d=a.length;d>c;c++)b=a[c],this._runWidget(b);return this},_runWidget:function(a){var b;return null==a&&(a={}),b="visualizer.modules."+a.module+".moduleViews."+a.view,Visualizer.Utils.waitForRepeatingEvents(function(c){return function(){var d;return null!=(d=c.get(b))?d.run(a.operation,a.params):void 0}}(this),this.get("drawWait"),"Scene Redraw for "+b,this.get("visualizer.timers"))},reload:function(){return Visualizer.Utils.waitForRepeatingEvents(function(a){return function(){return a.clearUnusedViews(),a.runWidgets()}}(this),this.get("fullRefreshWait"),"Full Scene Reload",this.get("visualizer.timers"))}})}.call(this),function(){var a,b;this.Visualizer.World=Ember.Object.extend({loaded:Ember.computed.gt("worldObj.length",0),$:function(a){return null!=a?this.get("worldObj").find(a):this.get("worldObj")},resize:function(){var a,b,c;return a=this.get("worldObj"),a.length?(b=this.get("worldObj").offset(),this.setProperties({width:a.innerWidth(),height:c=a.innerHeight(),top:b.top,left:b.left})):void 0}.observes("worldObj").on("init"),_bindGlobalEvents:function(){return $(window).on("resize",function(a){return function(){return a.resize()}}(this))}.on("init"),_bindWorldEvents:function(){var a;return(a=this.$()).length?a.off("click",".phasedButton").on("click",".phasedButton",b):void 0}.observes("worldObj").on("init"),injectDefaultWorld:function(){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.warn&&console.warn("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version."),this.$().empty().append($(a))}}),b=function(a){return $(this).hasClass("disabledItem")?(a.stopImmediatePropagation(),!1):Ember.run.next(this,function(){return $(this).addExpiringClass("disabledItem",2e3)})},a="
    "}.call(this),function(){Array.prototype.removeInstancesOf=function(a){for(var b;;){if(-1===(b=this.indexOf(a)))break;this.splice(b,1)}return this},Array.prototype.shuffleVals=function(){var a,b,c,d,e,f;for(a=e=0,f=this.length;f>e;a=++e)b=this[a],c=Math.floor(Math.random()*(a+1)),d=b,this[a]=this[c],this[c]=d;return this}}.call(this),function(){var a={}.hasOwnProperty;Ember.Object.reopen({values:function(){var b,c,d;d=[];for(b in this)a.call(this,b)&&(c=this[b],d.push(c));return d}})}.call(this),function(){jQuery.fn.extend({addExpiringClass:function(a,b){return null==a&&(a="disabled"),null==b&&(b=1e3),this.addClass(a),setTimeout(function(b){return function(){return b.removeClass(a)}}(this),b)}})}.call(this),function(){String.prototype.truncateTo=function(a,b){var c;return null==b&&(b="…"),c=b.length,(isNaN(a)||c>=a)&&(a=b.length+1),this.length>a?this.substr(0,a-c)+b:this},String.prototype.advancedIndexOf=function(a,b){var c;return null==b&&(b={}),c=this,b.isCaseInsensitive&&(c=c.toLowerCase(),a=a.toLowerCase()),c.indexOf(a)},String.prototype.includes=function(a,b){return this.advancedIndexOf(a,{isCaseInsensitive:b})>=0},String.prototype.beginsWith=function(a,b){return 0===this.advancedIndexOf(a,{isCaseInsensitive:b})},String.prototype.capitalizeLetter=function(a){var b;return null==a&&(a=0),b=0===a?"":this.slice(0,a),b+this.charAt(a).toUpperCase()+this.slice(a+1)},String.prototype.titleize=function(){return this.toLowerCase().replace(/\b\w/g,function(a){return a.toUpperCase()})},String.prototype.removeInitialUnderscore=function(){return this.replace(/^_/,"")}}.call(this),function(){var a;this.Visualizer.Utils={existsWithValue:function(a){return"undefined"!=typeof a&&null!==a},waitForRepeatingEvents:function(){var a,b;return b={},a=function(a,c,d,e){var f;return null==d&&(d="default timer"),null==e&&(e=b),f=e[d],f&&clearTimeout(f),e[d]=setTimeout(a,c)}}(),minVal:function(a,b){return b>=a?a:b},maxVal:function(a,b){return a>=b?a:b},boundedVal:function(a,b,c){return b>a?b:a>c?c:a},randBetween:function(a,b){return null==a&&(a=0),null==b&&(b=10),Math.random()*(b-a)+a},randIntBetween:function(a,b){return Math.floor(Visualizer.Utils.randBetween(a,b)||4)},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},relativeSizeString:function(a,b){var c;return c=parseInt(a),"string"==typeof a&&a.indexOf("%")>=0?c/100*b:isFinite(c)?c:void 0},intersectionSafe:function(a,b){var c,d,e;for(c=0,d=0,e=[];cb[d]?d++:(e.push(c),c++,d++);return e},intersectionCount:function(a,b){var c,d,e;for(c=0,d=0,e=0;cb[d]?d++:(e++,c++,d++);return e},cloneArray:function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("cloneArray function is deprecated, please use Array.copy()"),a.slice(0)}},window.waitForRepeatingEvents=function(){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Global Namespace for waitForRepeatingEvents function is deprecated, please use Visualizer.Utils.waitForRepeatingEvents"),Visualizer.Utils.waitForRepeatingEvents.apply(window,arguments)},window.existsWithValue=function(){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Global Namespace for existsWithValue function is deprecated, please use Visualizer.Utils.existsWithValue"),Visualizer.Utils.existsWithValue.apply(window,arguments)},Visualizer.Utils.updateKCodePosition=function(a,b){return 38===a?2>b?2>b&&(b+=1):b>2&&(b=1):(40!==a||2!==b&&3!==b)&&(37!==a||4!==b&&6!==b)&&(39!==a||5!==b&&7!==b)?66===a&&8===b?b+=1:b=65===a&&9===b?10:0:b+=1,b},a=function(a,b){return a>8&&(a=Math.floor(10*Math.random()+a-5)),b>8&&(b=Math.floor(10*Math.random()+b-5)),"http://placekitten.com/"+a+"/"+b}}.call(this),function(){this.Visualizer.Module=Ember.ArrayController.extend({visualizer:null,maxLength:100,content:Ember.computed(function(){return Ember.A()}).property(),dataset:Ember.computed.alias("arrangedContent"),moduleViews:Ember.computed(function(){return Ember.Object.create()}).property(),init:function(){return"function"==typeof this.setDefaultViews?this.setDefaultViews():void 0},requestRedraw:function(){var a,b,c;return b=this.get("visualizer.currentScene"),a=this.get("key"),null!=b&&null!=a?b.runWidgets(null!=(c=b.get("widgets"))?c.filterBy("module",a):void 0):void 0},forceLimit:function(a){var b;return null==a&&(a="timestamp"),b=this.get("dataset").sort(function(b,c){return c[a]-b[a]}),this.set("dataset",b.slice(0,this.get("maxLength")))},groupedBy:function(a){var b,c,d,e;return b=a.replace(".","__"),c="__groupedBy_"+b,null==(e=this.get(c))&&(d={},d[c]=function(){return this._groupedBy(a).sort(function(a,b){return b.length-a.length})}.property("dataset.@each."+a),this.reopen(d)),e||this.get(c)},_groupedBy:function(a){var b,c,d,e,f,g;for(b=Ember.Object.create(),g=this.get("dataset"),e=0,f=g.length;f>e;e++)c=g[e],d=Ember.get(c,a),(null!=b[d]?b[d]:b[d]=[]).push(c);return b.values()}})}.call(this),function(){this.Visualizer.ModuleView=Ember.Object.extend({module:null,containerSelector:null,previousSelectors:Ember.computed(function(){return[]}),visualizer:Ember.computed.alias("module.visualizer"),data:Ember.computed.alias("module.dataset"),arrangedContent:Ember.computed.alias("module.arrangedContent"),dimensionsDidChange:!0,init:function(a){return this.set("module",a)},clear:function(){},destroy:function(){return this.clear()},run:function(a,b){return null==b&&(b={}),b.container&&this.updateSelector(b.container),this._presetContainerAttrs(b),"function"==typeof this[a]?this[a](b):void 0},updateSelector:function(a){var b;return a!==(b=this.get("containerSelector"))?(this.clear(),this.get("previousSelectors").push(b),this.set("containerSelector",a)):void 0},$container:function(a){var b;return b=a?" "+a:"",this.get("visualizer.world").$(""+this.get("containerSelector")+b)},hardReset:function(){return this.set("dimensionsDidChange",!0),this.run("clear")}.observes("data"),widgetParamedOutlineCSS:function(a){var b,c,d,e,f;for(null==a&&(a={}),b={},f=["width","height","left","top"],d=0,e=f.length;e>d;d++)c=f[d],null!=a[c]&&(b[c]=""+this.get(c)+"px");return b},width:function(a,b){return this._updateDimension(a,b)}.property(),height:function(a,b){return this._updateDimension(a,b)}.property(),_updateDimension:function(a,b){var c;return null!=b&&(b=Math.floor(b),b!==(c=this.get(a))&&this.set("dimensionsDidChange",!0)),b},_presetContainerAttrs:function(a){var b;return null==a&&(a={}),null!=a.width&&null!=a.height||(b=this.$container(),null==a.width&&this.set("width",b.width()),null!=a.height)?void 0:this.set("height",b.height())}})}.call(this),function(){Visualizer.ModuleView.ResizableMixin=Ember.Mixin.create({run:function(a,b){return null==b&&(b={}),this._updateSize(b),this._super(a,b)},_updateSize:function(a){var b,c,d,e,f;for(null==a&&(a={}),this.get("visualizer.world").resize(),e=[{key:"width"},{key:"height"},{key:"left",req:"width"},{key:"top",req:"height"}],f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(this._tryUpdateValue(b.key,a[b.key],a,b.req));return f},_tryUpdateValue:function(a,b,c,d){var e,f;return null==c&&(c={}),null==d&&(d=a),null!=b&&(null!=c.padding&&(f=Visualizer.Utils.relativeSizeString(c.padding,this.get("visualizer.world."+d))),f=null!=f?f:15,e=Math.floor(Visualizer.Utils.relativeSizeString(b,this.get("visualizer.world."+d))-f),isFinite(e)&&this.get(a)!==e)?(this.set(a,e),!0):!1}})}.call(this); \ No newline at end of file diff --git a/build/js/j-visualizer.js b/build/js/j-visualizer.js new file mode 100644 index 0000000..a66c63e --- /dev/null +++ b/build/js/j-visualizer.js @@ -0,0 +1,2162 @@ + +/** + * Visualizer Object + * Represents the Object used to manage data (Modules), and the way that the data's viewed. + * + * The visualization of data is a combined effort of all components contained in this project, + * accessed through this Object. + * + * @class Visualizer + * @extends Ember.Object + */ + +(function() { + var Visualizer, + __hasProp = {}.hasOwnProperty; + + this.Visualizer = Visualizer = Ember.Object.extend({ + + /** + * world is a reference to a Visualizer.World Object, + * representing the main (overview) viewport. + * Further details/documentation can be found in the vis_world file + * + * @property world + * @type Object + */ + world: null, + + /** + * scenes is a reference to a collection of Visualizer.Scene Objects, + * each representing a Visualization (one or many views, on one or many datasets). + * Further details/documentation can be found in the vis_scene file + * + * @property scenes + * @type Object + */ + scenes: Ember.computed(function() { + return {}; + }), + + /** + * modules is a reference to a collection of Visualizer.Module Objects, + * which in turn are responsible for modelling the data collections + * and their relevant views. + * Further details/documentation can be found in the _visualizer_module file. + * + * @property modules + * @type Object + */ + modules: (Ember.computed(function() { + return Ember.Object.create(); + })).property(), + + /** + * associations is a reference to a collective Object datastore for cross-Module + * data. + * + * Currently this is implemented as a simple Object, but eventually it + * may make sense to create standardized Visualizer.Association objects + * similar to Visualizer.Modules... + * + * @property associations + * @type Object + */ + associations: (Ember.computed(function() { + return Ember.Object.create(); + })).property(), + + /** + * timers is a reference to an Object collection of Timeouts where + * keys are names given, and values are Timeout ids (as natively generated by setTimeout). + * This set is used to keep track of actions on a per-Visualizer level when + * preventing multiple exectution via Visualizer.Utils.waitForRepeatingEvents. + * Further details/documentation can be found in Visualizer.Utils + * + * @property timers + * @type Object + */ + timers: Ember.computed(function() { + return {}; + }), + + /** + * init is called upon creation of a Visualizer Object. + * It is responsible for the initial processing and setup of the Object. + * + * @param world Used for setting up the Visualizer.World Object + * @constructor + */ + init: function(world) { + this.useWorld(world); + return this.set("color", Visualizer.Colorer.create({ + visualizer: this + })); + }, + + /** + * useWorld creates a Visualizer.World object, using the a JQuery Object + * created with the sent parameter. This created object is set as the + * Visualizer Object's world property. + * + * @method useWorld + * @param world Used for setting up the Visualizer.World Object + * @return {void} + */ + useWorld: function(world) { + return this.set('world', Visualizer.World.create({ + worldObj: $(world), + visualizer: this + })); + }, + + /** + * Alias for Visualizer.World method: injectDefaultWorld + * @deprecated Use (visualizer).get('world').injectDefaultWorld() + */ + injectWorld: function() { + return this.get('world').injectDefaultWorld(); + }, + + /** + * addModule creates a Visualizer.Module object specified by the moduleClass parameter, + * using a provided key (to allow differentiation and access). If (optional) content + * parameter is provided, it will be set as the module's content. + * + * After the module's creation, the Visualizer object is refreshed. + * + * @method addModule + * @param {Module} moduleClass Class of a Visualizer.Module Object to be created + * @param {String} moduleKey Key used by the Visualizer and module for access and differentiation + * @param {Array} [content] (Optional) Collection of data to use immediately with the module + * @return {void} + */ + addModule: function(moduleClass, moduleKey, content) { + var module; + module = moduleClass.create({ + visualizer: this, + key: moduleKey + }); + this.set("modules." + moduleKey, module); + if (content != null) { + this.set("modules." + moduleKey + ".content", content); + } + return module.requestRedraw(); + }, + + /** + * refresh sends a request to the current scene to update the visualization + * based on all current dimensions. + * + * The scene will not be drawn unless the Visualizer's World is loaded (has a viewport). + * + * refresh observes the world's state, and the current scene - it should automatically + * be triggered when any of these things change to ensure an up-to-date Visualization. + * + * Note: because Ember Observers currently only watch Array collections (@each), not Object-maps, + * This will (sadly) not currently watch 'modules.@each.dataset'... + * + * @method refresh + * @return {void} + */ + refresh: (function() { + var _ref; + if (this.get('world.loaded')) { + return (_ref = this.get('currentScene')) != null ? _ref.reload() : void 0; + } + }).observes('currentScene', 'world.worldObj', 'world.loaded', 'world.width', 'world.height'), + + /** + * useScenes updates the Visualizer's scenes collection with the inputScenes parameter. + * For each item in inputScenes , a Visualizer.Scene object is created, with a + * reference to this instance of Visualizer as its visualizer parameter. + * + * @method useScenes + * @param {Array} inputScenes A set of scenes to create and use for Visualization. + * @return {void} + */ + useScenes: function(inputScenes) { + var scene, _i, _len, _results; + if (inputScenes == null) { + inputScenes = []; + } + if (!Visualizer.Utils.isArray(inputScenes)) { + if (typeof console !== "undefined" && console !== null) { + if (typeof console.log === "function") { + console.log("Object({})-type input for useScenes is deprecated - please pass an Array instead..."); + } + } + inputScenes = inputScenes.visualizer_scenes; + } + _results = []; + for (_i = 0, _len = inputScenes.length; _i < _len; _i++) { + scene = inputScenes[_i]; + scene.visualizer = this; + _results.push(this.set("scenes." + scene.identifier, Visualizer.Scene.create(scene))); + } + return _results; + }, + + /** + * setScene updates the Visualizer's currentScene property to reference the + * scene relevant to the method's _identifier parameter. + * + * @method setScene + * @param {String} _identifier The key identifier of a scene to use. + * @return {void} + */ + setScene: function(_identifier) { + return this.set('currentScene', this.get("scenes." + _identifier)); + }, + + /** + * destroy cleans up the Visualizer (asking each Module to remove its Views, etc.) + * + * @method destroy + * @return {void} + */ + destroy: function() { + var module, moduleName, _ref, _results; + _ref = this.get('modules'); + _results = []; + for (moduleName in _ref) { + if (!__hasProp.call(_ref, moduleName)) continue; + module = _ref[moduleName]; + _results.push(typeof module.destroy === "function" ? module.destroy() : void 0); + } + return _results; + } + }); + +}).call(this); + + +/** + * Visualizer Colorer + * An Object that manages the many colors of a visualization. + * + * @TODO refactor this file, simplify color sets, make generally less confusing. + * + * @class Colorer + * @namespace Visualizer + * @extends Ember.Object + */ + +(function() { + this.Visualizer.Colorer = Ember.Object.extend({ + + /** + * visualizer is a reference to the parent Visualizer instance. + * + * @property visualizer + * @type Visualizer + * @required + */ + visualizer: null, + + /** + * init is called upon creation of a Visualizer Colorer Object. + * It is responsible for the initial processing and setup of the Object. + * + * @constructor + */ + init: function() { + this.get("_assignedUniq"); + this.get("uniquePalette"); + return this._setUniqueProps(); + }, + + /** + * freshColorPalette creates a new copy of + * the main color scheme and returns it. + * + * + * @method freshColorPalette + * @return {Array} A collection of colors + */ + freshColorPalette: function() { + return this.get("_colorScheme").copy(); + }, + + /** + * fixed accepts a keyword, and attempts to use the keyword + * to find a relevant color (e.g. "positive" may be "green"). + * + * If a valid keyword is passed and a relevant color isn't found, + * a color is assigned from the rotating set. + * + * @method fixed + * @param {String} key The key for which a color is to be found + * @return {String} A color + */ + fixed: function(key) { + if (key == null) { + key = ""; + } + if ((key != null) && (key = "" + key.toLowerCase()).length) { + return this.get("_fixedVals." + key) || this._rotating_color(key); + } else { + return this.get('_defaultVal'); + } + }, + + /** + * uniquePalette is a collection of sets of remaining + * colors. Often it will only have a main set, but some + * applications may have more complex coloring needs. + * + * @property uniquePalette + * @type Object (of Objects) + * @required + */ + uniquePalette: Ember.computed(function() { + return {}; + }), + + /** + * _assignedUniq is a collection of sets of used colors + * (accessed by key). + * Often it will only have a main set, but some + * applications may have more complex coloring needs. + * + * @property uniquePalette + * @type Object (of Objects) + * @required + */ + _assignedUniq: Ember.computed(function() { + return {}; + }), + + /** + * unique is a function used to get a unique color for a + * given key within a given set (set defaults to "main"). + * + * This function has helper properties to handle assigning + * and unassigning colors, determining what the next color + * will be, and so on. + * + * @TODO consider refactoring / making an Object instead of Function + * (Sorry for the currently complex code) + * + * @method unique + * @param {String} key The key for which a color is to be found + * @param {String} [set='main'] The color set used to search get a color + * @return {String} A color or undefined... + */ + unique: function(key, set) { + if (key == null) { + key = ""; + } + if (set == null) { + set = "main"; + } + return this.get("_assignedUniq." + set + "." + key); + }, + + /** + * _setUniqueProps sets up the helper sub-functions on the `unique` function. + * + * This is complex, but allows the following syntax style: + * + * ```javascript + * colorer.unique("Dylan") => undefined + * colorer.unique.next() => "green" + * + * colorer.unique.assign("Dylan") => undefined + * colorer.unique("Dylan") => "green" + * colorer.unique.next() => "purple" + * + * colorer.unique.unassign("Dylan") => undefined + * colorer.unique("Dylan") => undefined + * ``` + * + * @method _setUniqueProps + * @return {void} + * @private + */ + _setUniqueProps: function() { + + /** + * unique.next returns the next available color which can be + * assigned to a key. + * + * @method unique.next + * @param {String} [set='main'] The color set used to search get a color + * @return {String} A color + */ + this.unique.next = (function(_this) { + return function(set) { + if (set == null) { + set = "main"; + } + _this.unique._prepareSet(set); + return _this.get("uniquePalette." + set + ".0"); + }; + })(this); + + /** + * unique.assign attempts to assign a color to a key within a color set. + * + * @method unique.assign + * @param {String} key The key for which a color is to be assigned + * @param {String} [set='main'] The color set used to search get a color + * @return {void} + */ + this.unique.assign = (function(_this) { + return function(key, set) { + var _poppedColor; + if (set == null) { + set = "main"; + } + _this.unique._prepareSet(set); + if ((key != null) && (_this.unique(key, set) == null)) { + _poppedColor = _this.get("uniquePalette." + set).shift() || _this.get("_defaultAssigned"); + return _this.set("_assignedUniq." + set + "." + key, _poppedColor); + } + }; + })(this); + + /** + * unique.unassign attempts to unassign a color to a key within a color set. + * The color is returned to the palette so that it may be reused later. + * + * @method unique.unassign + * @param {String} key The key for which a color is to be unassigned + * @param {String} [set='main'] The color set used to search get a color + * @return {void} + */ + this.unique.unassign = (function(_this) { + return function(key, set) { + var _color; + if (set == null) { + set = "main"; + } + _this.unique._prepareSet(set); + if (key != null) { + _color = _this.unique(key, set); + if ((_color != null) && (_color !== _this.get("_defaultUnassigned"))) { + if (_color !== _this.get("_defaultAssigned")) { + _this.get("uniquePalette." + set).push(_color); + } + delete _this.get("_assignedUniq." + set)[key]; + return _this.get("uniquePalette." + set + ".0"); + } + } + }; + })(this); + + /** + * unique.resetSet removes colors from all keys within the given set, + * and also replenishes the palette. + * + * @method unique.resetSet + * @param {String} set The color set used to search get a color + * @return {void} + */ + this.unique.resetSet = (function(_this) { + return function(set) { + _this.get("_assignedUniq")[set] = {}; + return _this.get("uniquePalette")[set] = _this.freshColorPalette().shuffleVals(); + }; + })(this); + + /** + * unique._prepareSet creates and prepares a color set if it doesn't yet exist. + * + * @method unique._prepareSet + * @param {String} set The color set used to search get a color + * @return {void} + */ + return this.unique._prepareSet = (function(_this) { + return function(set) { + if (_this.get("uniquePalette." + set) == null) { + return _this.unique.resetSet(set); + } + }; + })(this); + }, + + /** + * _defaultAssigned is the default color to use for highlighting an item + * (when no other colors in the scheme apply - such as when you + * wish to have unique colors per-key but have no more colors available) + * + * @property _defaultAssigned + * @type String (a color) + */ + _defaultAssigned: "#5895B2", + + /** + * _defaultUnassigned is the default color to use for + * non-highlighted, but still colored, items. + * + * @property _defaultUnassigned + * @type String (a color) + */ + _defaultUnassigned: "#8da3b0", + + /** + * _colorScheme is a collection of colors used in the visualization. + * + * @property _colorScheme + * @type Array (of color Strings) + */ + _colorScheme: ["#3498DB", "#9B59B6", "#F2CA27", "#34495E", "#1ABC9C", "#E74C3C", "#95A5A6", "#ECF0F1", "#2ECC71", "#5895B2"], + _rotating_color_val: Ember.computed(function() { + return {}; + }), + _rotating_keys_used: 0, + + /** + * _rotating_color returns an assigned color for a given key + * if available, otherwise assigns a color from the _colorScheme + * (unlike unique(), if all colors are used up, it + * starts from the first color again.) + * + * @method _rotating_color + * @param {String} key The key for which a color is to be found + * @return {String} A color + */ + _rotating_color: function(key) { + var color, _scheme; + if (key != null) { + if (!(color = this.get("_rotating_color_val." + key))) { + _scheme = this.get('_colorScheme'); + color = _scheme[(this._rotating_keys_used++) % _scheme.length]; + this.set("_rotating_color_val." + key, color); + } + return color; + } + }, + _defaultVal: Ember.computed(function() { + var _ref; + return ((_ref = window.colors) != null ? _ref.defaultSingle : void 0) || this.get('_defaultAssigned'); + }), + + /** + * _fixedVals is a collection of key => color pairs for + * commonly used keys + * + * @property _fixedVals + * @type Object (key => String (color) pairs) + * @required + */ + _fixedVals: { + blog: "#28cfc5", + board: "#FB913F", + twitter: "#2AA9E0", + facebook: "#4D69A2", + google: "#DD4C39", + youtube: "#E14D42", + instagram: "#FFCB33", + linkedin: "#1E87BD", + male: "#29A0CE", + unisex: "#d6dadb", + female: "#FC4482", + positive: "#74B81D", + negative: "#E74C3C", + neutral: "#A8CEE0", + unknown: "#d6dadb" + } + }); + +}).call(this); + + +/** + * Visualizer Scene + * Represents the Object used to manage data (Modules), and the way the data's viewed. + * + * The visualization of data is a combined effort of all components contained in this project, + * accessed through this Object. + * + * @class Scene + * @namespace Visualizer + * @extends Ember.Object + */ + +(function() { + var __hasProp = {}.hasOwnProperty; + + this.Visualizer.Scene = Ember.Object.extend({ + + /** + * visualizer is a reference to the parent Visualizer instance. + * + * @property visualizer + * @type Visualizer + * @required + */ + visualizer: null, + + /** + * identifier is a string identifier uniquie to this instance of a Scene + * + * @property identifier + * @type String + * @required + */ + identifier: null, + + /** + * title is simply a title for the scene, which some + * Visualizer applications may find useful for guiding users. + * + * @property title + * @type String + * @optional + */ + title: null, + + /** + * description is simply a description of the scene, which some + * Visualizer applications may find useful for describing a scene to users. + * + * @property description + * @type String + * @optional + */ + description: null, + + /** + * drawWait is the debounce time waited before running a single widget's update. + * If a widget's reload is requested many times in rapid succession it will wait + * until drawWait milliseconds after the last call before executing the reload. + * + * @property drawWait + * @type Integer (milliseconds) + * @default 100 + * @required + */ + drawWait: 100, + + /** + * fullRefreshWait is an additional debounce time waited before + * totally updating the scene. This adds some + * + * @property fullRefreshWait + * @type Integer (milliseconds) + * @default 20 + * @required + */ + fullRefreshWait: 20, + + /** + * widgets references a collection of "widget" Objects, each of which + * should reference a Module, a ModuleView, an operation to call upon the ModuleView, + * and any additional parameters required (specifications for the ModuleView to follow). + * + * @property widgets + * @type Array + * @required + */ + widgets: Ember.computed(function() { + return []; + }), + + /** + * requestedModuleViews is a computed property that returns + * a dictionary of Modules -> ModuleViews , used to determine which views will be + * used by the scene. This is particularly useful when changing scenes to determine + * which Views need to be cleared out, and which will be used in the next scene. + * + * Used as a searchable dictionary: `requestedModuleViews[moduleA][moduleViewA] => true` + * + * @property requestedModuleViews + * @type Object + */ + requestedModuleViews: (function() { + var moduleKey, moduleList, widget, _i, _len, _name, _ref; + moduleList = {}; + _ref = this.get('widgets'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + widget = _ref[_i]; + moduleKey = (moduleList[_name = widget.module] != null ? moduleList[_name] : moduleList[_name] = {}); + moduleKey[widget.view] = true; + } + return moduleList; + }).property('widgets.@each'), + + /** + * clearUnusedViews sends a "clear" request to each ModuleView used by the current + * instance of Visualizer, which isn't used in any of this scene's widgets. + * In essence it ensures that any Views that are not currently in use are cleansed. + * + * @method clearUnusedViews + * @chainable + */ + clearUnusedViews: function() { + var module, moduleName, view, viewName, _ref, _ref1; + _ref = this.get("visualizer.modules"); + for (moduleName in _ref) { + if (!__hasProp.call(_ref, moduleName)) continue; + module = _ref[moduleName]; + _ref1 = module.get('moduleViews'); + for (viewName in _ref1) { + if (!__hasProp.call(_ref1, viewName)) continue; + view = _ref1[viewName]; + if (!this.get("requestedModuleViews." + moduleName + "." + viewName)) { + if (typeof view.clear === "function") { + view.clear(); + } + } + } + } + return this; + }, + + /** + * runWidgets iterated this scene's widgets, and requests that the ModuleView specified + * for each widget executes the operation specified for each widget. + * + * For example, it may tell one ModuleView, a word cloud, to draw itself, and + * another ModuleView, a set of icons, to group themselves by common-words. + * + * @method runWidgets + * @chainable + */ + runWidgets: function(widgets) { + var widget, _i, _len; + if (widgets == null) { + widgets = this.get('widgets'); + } + for (_i = 0, _len = widgets.length; _i < _len; _i++) { + widget = widgets[_i]; + this._runWidget(widget); + } + return this; + }, + + /** + * _runWidget runs the current scene's operation for a single widget. + * Waits for repeating events to prevent multiple refreshes on the + * same dimensions/parameters. + * + * @method _runWidget + * @return {void} + * @private + */ + _runWidget: function(widget) { + var viewIdentifier; + if (widget == null) { + widget = {}; + } + viewIdentifier = "visualizer.modules." + widget.module + ".moduleViews." + widget.view; + return Visualizer.Utils.waitForRepeatingEvents(((function(_this) { + return function() { + var _ref; + return (_ref = _this.get(viewIdentifier)) != null ? _ref.run(widget.operation, widget.params) : void 0; + }; + })(this)), this.get("drawWait"), "Scene Redraw for " + viewIdentifier, this.get('visualizer.timers')); + }, + + /** + * reload initiates the process of updating the visualization by cleaning out old Views + * and updating all current widgets. + * + * Prevents rapid-exectuion by delaying each request by an amount of time specified + * by property drawWait, and afterward only using the most recent request (as a debounce). + * + * @method reload + * @return {void} + */ + reload: function() { + return Visualizer.Utils.waitForRepeatingEvents(((function(_this) { + return function() { + _this.clearUnusedViews(); + return _this.runWidgets(); + }; + })(this)), this.get('fullRefreshWait'), "Full Scene Reload", this.get('visualizer.timers')); + } + }); + +}).call(this); + + +/** + * Visualizer World + * Represents an Object used to manage an overview viewport for visualizations. + * + * @class World + * @namespace Visualizer + * @extends Ember.Object + */ + +(function() { + var defaultWorldTemplate, _handlePhasedButtonClick; + + this.Visualizer.World = Ember.Object.extend({ + + /** + * loaded is a boolean variable indicating whether or the world is + * prepared to hold a visualization. + * + * Currently it simply check's whether the world JQuery object exists + * + * @property loaded + * @type Boolean + */ + loaded: Ember.computed.gt('worldObj.length', 0), + + /** + * $ is a method which returns the world's JQuery Object, worldObj. + * If a parameter is passed, $ will attempt to find that parameter + * withing the structure of the worldObj. + * + * @method $ + * @param [selector] A CSS selector to use to find nodes within this World + * @return {JQuery Object} + */ + $: function(selector) { + if (selector != null) { + return this.get('worldObj').find(selector); + } else { + return this.get('worldObj'); + } + }, + + /** + * resize recalculates the width, height, top, and left properties of the + * worldObj DOM Element + * + * This method is automatically called when a World is created. + * + * @method resize + * @return {void} + */ + resize: (function() { + var $worldObj, offset, _height; + $worldObj = this.get('worldObj'); + if ($worldObj.length) { + offset = this.get('worldObj').offset(); + return this.setProperties({ + width: $worldObj.innerWidth(), + height: (_height = $worldObj.innerHeight()), + top: offset.top, + left: offset.left + }); + } + }).observes('worldObj').on('init'), + + /** + * _bindGlobalEvents binds this World's resize event to the window's resize, + * such that every time the window's size changes this World attempts to + * update its properties to reflect the new window. + * + * Private, since this method is automatically called when a World is created. + * + * @method _bindGlobalEvents + * @return {void} + * @private + */ + _bindGlobalEvents: (function() { + return $(window).on("resize", (function(_this) { + return function() { + return _this.resize(); + }; + })(this)); + }).on('init'), + + /** + * _bindWorldEvents binds and generic event listeners that + * occur within the World's domain + * + * Private, since this method is automatically called when a World is created + * as well as when the worldObj changes to reference a new area. + * + * @method _bindWorldEvents + * @return {void} + * @private + */ + _bindWorldEvents: (function() { + var $world; + if (($world = this.$()).length) { + return $world.off("click", ".phasedButton").on("click", ".phasedButton", _handlePhasedButtonClick); + } + }).observes('worldObj').on('init'), + + /** + * injectDefaultWorld clears out the Visualizer World's contents, injects the basic + * visualizer skeleton + * + * @deprecated @todo Deprecate this. ModuleViews should take care of this on a per-App basis... + * + * @method injectDefaultWorld + * @return {void} + */ + injectDefaultWorld: function() { + if (typeof console !== "undefined" && console !== null) { + if (typeof console.warn === "function") { + console.warn("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version."); + } + } + return this.$().empty().append($(defaultWorldTemplate)); + } + }); + + + /** + * _handlePhasedButtonClick is called when an element with class phasedButton + * is clicked. Adds a class 'disabledItem' to the element for 2 seconds; + * if the element is clicked again before the class 'disabledItem' class expires, + * the click will be ignored. + * + * @method _handlePhasedButtonClick + * @return {void} + * @private + */ + + _handlePhasedButtonClick = function(e) { + if ($(this).hasClass("disabledItem")) { + e.stopImmediatePropagation(); + return false; + } + return Ember.run.next(this, function() { + return $(this).addExpiringClass("disabledItem", 2000); + }); + }; + + defaultWorldTemplate = "
    "; + +}).call(this); + + +/** + * removeInstancesOf removes traces of a provided value from an Array + * + * @method removeInstancesOf + * @param value The item to find-and-remove + * @return {Array} The modified Array (with value removed) + * @for Array + * @namespace NativeClass + */ + +(function() { + Array.prototype.removeInstancesOf = function(value) { + var val_location; + while (true) { + if ((val_location = this.indexOf(value)) === -1) { + break; + } else { + this.splice(val_location, 1); + } + } + return this; + }; + + + /** + * shuffleVals - Fisher-Yates algorithm for shuffling arrays + * in-place. (Essentially goes through each slot in array and + * switches its value with one from a random slot...) + * + * @method shuffleVals + * @return {Array} The shuffled Array + * @for Array + * @namespace NativeClass + */ + + Array.prototype.shuffleVals = function() { + var i, item, randLocation, temp, _i, _len; + for (i = _i = 0, _len = this.length; _i < _len; i = ++_i) { + item = this[i]; + randLocation = Math.floor(Math.random() * (i + 1)); + temp = item; + this[i] = this[randLocation]; + this[randLocation] = temp; + } + return this; + }; + +}).call(this); + +(function() { + var __hasProp = {}.hasOwnProperty; + + Ember.Object.reopen({ + + /** + * values takes an Object and returns its values + * (similar to `.keys()`) + * + * @method values + * @return {Array} The values + */ + values: function() { + var key, value, _results; + _results = []; + for (key in this) { + if (!__hasProp.call(this, key)) continue; + value = this[key]; + _results.push(value); + } + return _results; + } + }); + +}).call(this); + + +/** + * addExpiringClass adds a temporary class to a JQuery object. + * The class has an expiry, after which it is removed. + * + * @method addExpiringClass + * @param {String} [className="disabled"] Class name + * @param {Integer} [timeout=1000] Number of milliseconds until class expires + * @return {void} + * @for fn + * @namespace jQuery + */ + +(function() { + jQuery.fn.extend({ + addExpiringClass: function(className, timeout) { + if (className == null) { + className = "disabled"; + } + if (timeout == null) { + timeout = 1000; + } + this.addClass(className); + return setTimeout(((function(_this) { + return function() { + return _this.removeClass(className); + }; + })(this)), timeout); + } + }); + +}).call(this); + + +/** + * truncateTo ensures a string is no longer than a given size limit. + * (In the case that it is longer, a suffix can be given for truncation) + * + * @method truncateTo + * @param {Integer} maxLength The maximum length of the String + * @param {String} [suffix="…"] A String to use append in case of truncation + * @return {String} The String cut to maxLength or fewer characters + * @for String + * @namespace NativeClass + */ + +(function() { + String.prototype.truncateTo = function(maxLength, suffix) { + var suffixLength; + if (suffix == null) { + suffix = "…"; + } + suffixLength = suffix.length; + if (isNaN(maxLength) || maxLength <= suffixLength) { + maxLength = suffix.length + 1; + } + if (this.length > maxLength) { + return this.substr(0, maxLength - suffixLength) + suffix; + } + return this; + }; + + + /** + * advancedIndexOf searches the object String for a parameter + * substring, allows additional options (such as case-insensitivity). + * + * @method advancedIndexOf + * @param {String} subString The substring to search for + * @param {Object} [options] Additional options for searching + * @return {Integer} Similar to indexOf: -1 if not found, + * otherwise the first start position of the substring. + * @for String + * @namespace NativeClass + */ + + String.prototype.advancedIndexOf = function(subString, options) { + var thisString; + if (options == null) { + options = {}; + } + thisString = this; + if (options.isCaseInsensitive) { + thisString = thisString.toLowerCase(); + subString = subString.toLowerCase(); + } + return thisString.indexOf(subString); + }; + + + /** + * includes searches the object String for a parameter + * substring, returns boolean, accepts optional parameter + * to specify whether the search should be case-insensitive. + * + * @method includes + * @param {String} subString The substring to search for + * @param {Boolean} [isCaseInsensitive=false] Specify whether search is case-sensitive + * @return {Boolean} True if substring was found, otherwise false + * @for String + * @namespace NativeClass + */ + + String.prototype.includes = function(subString, isCaseInsensitive) { + return this.advancedIndexOf(subString, { + isCaseInsensitive: isCaseInsensitive + }) >= 0; + }; + + + /** + * beginsWith searches the start of the object String for a parameter + * substring, returns boolean, accepts optional parameter + * to specify whether the search should be case-insensitive. + * + * @method beginsWith + * @param {String} subString The substring to search for + * @param {Boolean} [isCaseInsensitive=false] Specify whether search is case-sensitive + * @return {Boolean} True if substring was found at the beginning, otherwise false + * @for String + * @namespace NativeClass + */ + + String.prototype.beginsWith = function(subString, isCaseInsensitive) { + return this.advancedIndexOf(subString, { + isCaseInsensitive: isCaseInsensitive + }) === 0; + }; + + + /** + * capitalizeLetter is a String capitalize function adapted from + * http://stackoverflow.com/a/3291856/624590 . + * Capitalizes the letter at position n of the object String. + * + * @method capitalizeLetter + * @param {Integer} [n=0] The index of the character to capitalize + * @return {String} The modified String with capitalized letter + * @for String + * @namespace NativeClass + */ + + String.prototype.capitalizeLetter = function(n) { + var start; + if (n == null) { + n = 0; + } + start = n === 0 ? "" : this.slice(0, n); + return start + this.charAt(n).toUpperCase() + this.slice(n + 1); + }; + + + /** + * titleize creates a title-formatted copy of a String + * + * @method titleize + * @return {String} The modified String with updated casing + * @for String + * @namespace NativeClass + */ + + String.prototype.titleize = function() { + return this.toLowerCase().replace(/\b\w/g, function(match) { + return match.toUpperCase(); + }); + }; + + + /** + * removeInitialUnderscore removes the first leading underscore from a String + * + * @method removeInitialUnderscore + * @return {String} The modified String with leading underscore removed + * @for String + * @namespace NativeClass + */ + + String.prototype.removeInitialUnderscore = function() { + return this.replace(/^_/, ""); + }; + +}).call(this); + + +/** + * Visualizer Utils + * A collection of common utility functions used in the Visualizer. + * + * @class Utils + * @namespace Visualizer + */ + +(function() { + var getRandomKitten; + + this.Visualizer.Utils = { + + /** + * existsWithValue checks if a values isn't null/undefined + * + * @method existsWithValue + * @param {Object} item An item to check existence of + * @return {Boolean} false if param is null or undefined, otherwise true + */ + existsWithValue: function(item) { + return typeof item !== "undefined" && item !== null; + }, + + /** + * waitForRepeatingEvents is a debounce-like function for preventing + * multiple execution. It should be called with a function and an + * amount of time to wait. It can also be provided a timer name so as + * to namespace the blocked items. It can also be called with an Object + * timer set to allow different objects to not prevent the execution of + * functions in others. + * + * @method waitForRepeatingEvents + * @param {Function} callback The function to be called at end of waiting time + * @param {Integer} timeout Number of milliseconds to wait before exectuing function + * @param [String] timerName A namespace for the debounce @default "default timer" + * @param [Object] timerSet A collection of timers to use in blocking functions @default {} + * @return {Integer} The Timeout id assigned by the browser for the created timeout. + */ + waitForRepeatingEvents: (function() { + var func, _timers; + _timers = {}; + return func = function(callback, timeout, timerName, timerSet) { + var storedTimer; + if (timerName == null) { + timerName = "default timer"; + } + if (timerSet == null) { + timerSet = _timers; + } + storedTimer = timerSet[timerName]; + if (storedTimer) { + clearTimeout(storedTimer); + } + return timerSet[timerName] = setTimeout(callback, timeout); + }; + })(), + + /** + * minVal takes two parameters, returns the smaller + * + * @method minVal + * @param {Untyped} a An item to compare + * @param {Untyped} b An item to compare + * @return {Untyped} The smaller item + */ + minVal: function(a, b) { + if (a <= b) { + return a; + } else { + return b; + } + }, + + /** + * maxVal takes two parameters, returns the larger + * + * @method maxVal + * @param {Untyped} a An item to compare + * @param {Untyped} b An item to compare + * @return {Untyped} The larger item + */ + maxVal: function(a, b) { + if (a >= b) { + return a; + } else { + return b; + } + }, + + /** + * boundedVal takes three parameters: an item, the lower bound, + * and the upper bound. If the item is between the bounds, + * the item is returned, otherwise the failed bound is returned. + * + * @method boundedVal + * @param {Untyped} tried_value An item to compare + * @param {Untyped} minimum_value The lower bound + * @param {Untyped} maximum_value The upper bound + * @return {Untyped} An object that's within the boundaries. + */ + boundedVal: function(tried_value, minimum_value, maximum_value) { + if (minimum_value > tried_value) { + return minimum_value; + } else if (maximum_value < tried_value) { + return maximum_value; + } else { + return tried_value; + } + }, + + /** + * randBetween provides a random number between two values. + * + * @method randBetween + * @param {Number} [min=0] The lower bound + * @param {Number} [max=10] The upper bound + * @return {Number} A random number between min and max + */ + randBetween: function(min, max) { + if (min == null) { + min = 0; + } + if (max == null) { + max = 10; + } + return (Math.random() * (max - min)) + min; + }, + + /** + * randIntBetween provides a random (rounded) Integer between two values. + * + * @method randIntBetween + * @param {Number} min The lower bound + * @param {Number} max The upper bound + * @return {Integer} A random Integer between min and max + */ + randIntBetween: function(min, max) { + return Math.floor(Visualizer.Utils.randBetween(min, max) || 4); + }, + + /** + * isArray returns a flag of whether the parameter is of type Array + * + * @method isArray + * @param {Untyped} input The object to check + * @return {Boolean} Whether the input is an Array or not. + */ + isArray: function(input) { + return Object.prototype.toString.call(input) === "[object Array]"; + }, + + /** + * relativeSizeString parses an input size for either an explicit + * value, or a value in relationship to some parent value. + * E.g. "50%" of 900 = 450, "50" = 50, "50px" = 50 + * + * @method relativeSizeString + * @param {String} val The input value to parse + * @param {Number} parentVal A number to use for relative parsing + * @return {Number} The parsed numeric value + */ + relativeSizeString: function(val, parentVal) { + var parsedVal; + parsedVal = parseInt(val); + if (typeof val === "string" && val.indexOf("%") >= 0) { + return (parsedVal / 100) * parentVal; + } else if (isFinite(parsedVal)) { + return parsedVal; + } + }, + + /** + * intersectionSafe is simple intersection code, iterates along two + * sorted arrays incrementing the index of the smaller value + * (if values are equal, it is part of intersection, and so store position and iterate both). + * Returns array of indices of intersecting values with respect to the first array passed. + * + * intersectionSafe is modified from code found on StackOverflow at: + * http://stackoverflow.com/a/1885660/624590 + * + * @method intersectionSafe + * @param {Array} a A sorted Array for comparison + * @param {Array} b A sorted Array for comparison + * @return {Array} The intersection of the two Arrays + */ + intersectionSafe: function(a, b) { + var a_index, b_index, results; + a_index = 0; + b_index = 0; + results = []; + while ((a_index < a.length) && (b_index < b.length)) { + if (a[a_index] < b[b_index]) { + a_index++; + } else if (a[a_index] > b[b_index]) { + b_index++; + } else { + results.push(a_index); + a_index++; + b_index++; + } + } + return results; + }, + + /** + * intersectionCount is a modified form of intersectionSafe that simply + * increments a counter instead of building an intersection Array. + * (Faster because increments rather than pushing values to array, + * also more memory efficient; JSPerf suggests 100% performance increase + * - beneficial for large datasets...) + * + * @method intersectionCount + * @param {Array} a A sorted Array for comparison + * @param {Array} b A sorted Array for comparison + * @return {Integer} The size of the intersection of the two Arrays + */ + intersectionCount: function(a, b) { + var a_index, b_index, count; + a_index = 0; + b_index = 0; + count = 0; + while ((a_index < a.length) && (b_index < b.length)) { + if (a[a_index] < b[b_index]) { + a_index++; + } else if (a[a_index] > b[b_index]) { + b_index++; + } else { + count++; + a_index++; + b_index++; + } + } + return count; + }, + + /** + * cloneArray creates a copy of an Array. + * + * @deprecated use Array.copy instead. + * + * @method cloneArray + * @param {Array} inputArray An Array to copy + * @return {Array} A copy of the input Array + */ + cloneArray: function(inputArray) { + if (typeof console !== "undefined" && console !== null) { + if (typeof console.log === "function") { + console.log("cloneArray function is deprecated, please use Array.copy()"); + } + } + return inputArray.slice(0); + } + }; + + + /* + * Previously Globally defined functions... + */ + + window.waitForRepeatingEvents = function() { + if (typeof console !== "undefined" && console !== null) { + if (typeof console.log === "function") { + console.log("Global Namespace for waitForRepeatingEvents function is deprecated, please use Visualizer.Utils.waitForRepeatingEvents"); + } + } + return Visualizer.Utils.waitForRepeatingEvents.apply(window, arguments); + }; + + window.existsWithValue = function() { + if (typeof console !== "undefined" && console !== null) { + if (typeof console.log === "function") { + console.log("Global Namespace for existsWithValue function is deprecated, please use Visualizer.Utils.existsWithValue"); + } + } + return Visualizer.Utils.existsWithValue.apply(window, arguments); + }; + + + /* + * FUN! + */ + + Visualizer.Utils.updateKCodePosition = function(key_pressed, position_tracker) { + if (key_pressed === 38) { + if (position_tracker < 2) { + if (position_tracker < 2) { + position_tracker += 1; + } + } else if (position_tracker > 2) { + position_tracker = 1; + } + } else if (key_pressed === 40 && (position_tracker === 2 || position_tracker === 3)) { + position_tracker += 1; + } else if (key_pressed === 37 && (position_tracker === 4 || position_tracker === 6)) { + position_tracker += 1; + } else if (key_pressed === 39 && (position_tracker === 5 || position_tracker === 7)) { + position_tracker += 1; + } else if (key_pressed === 66 && position_tracker === 8) { + position_tracker += 1; + } else if (key_pressed === 65 && position_tracker === 9) { + position_tracker = 10; + } else { + position_tracker = 0; + } + return position_tracker; + }; + + getRandomKitten = function(width, height) { + if (width > 8) { + width = Math.floor((Math.random() * 10) + width - 5); + } + if (height > 8) { + height = Math.floor((Math.random() * 10) + height - 5); + } + return "http://placekitten.com/" + width + "/" + height; + }; + +}).call(this); + + +/** + * Visualizer Module + * A Visualizer Module is a collection of data used for Visualization. + * It keeps access slightly standardized and offers several helpers to + * simplify data management. + * + * Each Module also has a collection of relevant ModuleViews - Objects that + * define and take care of how a given Module's data can be displayed. + * + * @class Module + * @namespace Visualizer + * @extends Ember.ArrayController + */ + +(function() { + this.Visualizer.Module = Ember.ArrayController.extend({ + + /** + * visualizer is a reference to the parent Visualizer instance. + * + * @property visualizer + * @type Visualizer + * @required + */ + visualizer: null, + + /** + * maxLength is an integer size of how much data should be displayed. + * Sometimes a project will collect more data than is practical to display + * to the user (either because it will be confusing, or otherwise too slow); + * this property represents that limit. + * + * @property maxLength + * @type Integer + * @required + */ + maxLength: 100, + + /** + * content is the full set of data (in Array , Ember.Array) form that is + * available to this Module. + * + * Note: this attribute should only be accessed from the + * data-management side of your app; it's where you dump data, and it's + * what you generally access for front-end filtering. This Module's + * ModuleViews should not access the content, however - they should access + * the dataset (which is a subset of content). + * + * @property content + * @type Ember.Array + * @required + */ + content: (Ember.computed(function() { + return Ember.A(); + })).property(), + + /** + * dataset is the subset of content used for current visualization. + * It can potentially be the exact same data as content, in full, + * but it can also be a limited/truncated version (often using the + * maxLength property). It may also filtered down by properties, etc. + * + * ModuleViews should only look here for their Module data. + * + * + * @property dataset + * @type Ember.Array + * @required + */ + dataset: Ember.computed.alias('arrangedContent'), + + /** + * moduleViews an object dictionary/map of Visualizer ModuleView objects, + * each of which must be relevant to this particular Module's data structuring. + * + * For example, if this Module is a set of words with frequencies, a WordCloud + * may be an applicable ModuleView. + * + * @property moduleViews + * @type Ember.Object + * @required + */ + moduleViews: (Ember.computed(function() { + return Ember.Object.create(); + })).property(), + + /** + * init is called upon creation of a Visualizer Module Object. + * It is responsible for the initial processing and setup of the Object. + * + * Any preprocessing that is required to make the Module valid should be + * done, at latest, on init. + * + * If the Module defines a setDefaultViews function (to prepopulate its + * ModuleViews), that function will be called automatically. + * + * @constructor + */ + init: function() { + return typeof this.setDefaultViews === "function" ? this.setDefaultViews() : void 0; + }, + + /** + * requestRedraw sends a request to the current scene + * to redraw the widgets relevant to this module (and no others). + * + * @method requestRedraw + * @return {void} + */ + requestRedraw: function() { + var key, scene, _ref; + scene = this.get('visualizer.currentScene'); + key = this.get('key'); + if ((scene != null) && (key != null)) { + return scene.runWidgets((_ref = scene.get('widgets')) != null ? _ref.filterBy('module', key) : void 0); + } + }, + + /** + * forceLimit sorts the current data by a provided key, and selects only the + * first maxLength (property) items for this Module's dataset, ensuring that + * the limit to the viewed-data's size is enforced. + * + * @TODO consider implementing a n-item max-heap data structure instead of sorting + * + * @method forceLimit + * @param {String} [key='timestamp'] Property to use for sorting the data. + * @return {void} + */ + forceLimit: function(key) { + var items; + if (key == null) { + key = 'timestamp'; + } + items = this.get('dataset').sort(function(_a, _b) { + return _b[key] - _a[key]; + }); + return this.set('dataset', items.slice(0, this.get('maxLength'))); + }, + + /** + * groupedBy creates a cached property on the Module to retrieve its data + * in the form of a two-dimensional Array, where the sub arrays contain + * this Module's dataset split into sets that share a common (passed) property. + * + * The outside Array is sorted by length, so the largest groups are at the start. + * + * Since the result is cached, it will only be recomputed when the dataset changes, + * keeping this efficient. The first time you use groupBy for any given property + * after the data changes (or is created) runs O(nlogn), but each subsequent access + * is simply O(1) as it simply grabs the previous data. Say what??? :P + * + * @method groupedBy + * @param {String} property Property to use for grouping the data. + * @return {Array} The Module's dataset grouped by the property + */ + groupedBy: function(property) { + var cachableProperty, cache, newProp, val; + cachableProperty = property.replace('.', '__'); + cache = "__groupedBy_" + cachableProperty; + if ((val = this.get(cache)) == null) { + newProp = {}; + newProp[cache] = (function() { + return this._groupedBy(property).sort(function(_a, _b) { + return _b.length - _a.length; + }); + }).property("dataset.@each." + property); + this.reopen(newProp); + } + return val || this.get(cache); + }, + + /** + * _groupedBy groups the Module's dataset by a given property, returning + * an unsorted, two-dimensional array. + * + * This method should not be called explicitly, instead developers should + * go through the `groupedBy` method (no leading underscore), which + * caches the groups (making redraws far more efficient) + * + * @method _groupedBy + * @param {String} property Property to use for grouping the data. + * @return {Array} The Module's dataset grouped by the property + */ + _groupedBy: function(property) { + var grouped, item, key, _i, _len, _ref; + grouped = Ember.Object.create(); + _ref = this.get('dataset'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + item = _ref[_i]; + key = Ember.get(item, property); + (grouped[key] != null ? grouped[key] : grouped[key] = []).push(item); + } + return grouped.values(); + } + }); + +}).call(this); + + +/** + * Visualizer ModuleView + * Module Views encapsulate the functionality for drawing, + * coloring, and handling events on visualizations of the data + * provided by a Module. These are the "visual" side of + * data visualizations. + * + * @class ModuleView + * @namespace Visualizer + * @extends Ember.Object + */ + +(function() { + this.Visualizer.ModuleView = Ember.Object.extend({ + + /** + * module is a reference to the parent Module for this ModuleView instance. + * + * @property module + * @type Visualizer.Module + * @required + */ + module: null, + + /** + * containerSelector is a string CSS selector used for finding + * this ModuleView's window in a Visualization. + * + * Often unique, but occasionally multiple ModuleViews will be + * written to share a container. + * + * Often this property will be specified in a widget's parameters, + * otherwise child classes to ModuleView should specify defaults. + * If a widget does specify a `container` param, it will be set and used + * running any operation. + * + * @property containerSelector + * @type String + * @required + */ + containerSelector: null, + + /** + * previousSelectors is a list history of selectors that were + * previously set as this instance of a ModuleView's containerSelector. + * + * This may be useful for navigation, or for cleaning up after a visualization. + * + * @property previousSelectors + * @type Array + */ + previousSelectors: Ember.computed(function() { + return []; + }), + + /** + * visualizer is a reference to the parent Visualizer instance. + * + * @property visualizer + * @type Visualizer + * @required + */ + visualizer: Ember.computed.alias('module.visualizer'), + + /** + * data is a reference to the visible data for visualization. + * + * @property data + * @type Ember.Array + * @required + */ + data: Ember.computed.alias('module.dataset'), + + /** + * arrangedContent is a reference to all Module data (sorted/arranged). + * This property should only seldom be accessed because it includes + * data which is deemed irrelevant by the Module (filtered, etc.) + * + * It may, however, be useful if a View decides to animate old data away + * upon filtering / limiting its viewable data. + * + * @property arrangedContent + * @type Ember.Array + * @optional + */ + arrangedContent: Ember.computed.alias('module.arrangedContent'), + + /** + * dimensionsDidChange is a flag used by ModuleViews to decide how much + * processing is required when they run an operation. + * + * If all dimensions, including visible data, width, and height, are + * unchanged, often times the old Visualization can simply be shown. + * + * Set to true by default, so that ModuleViews can have a proper first-draw. + * + * @property dimensionsDidChange + * @type Boolean + */ + dimensionsDidChange: true, + + /** + * init is called upon creation of a Visualizer ModuleView Object. + * It is responsible for the initial processing and setup of the Object. + * + * Any preprocessing that is required to make the Module valid should be + * done, at latest, on init. By default it sets the parent Module reference. + * + * @constructor + */ + init: function(module) { + return this.set('module', module); + }, + + /** + * clear cleanses/hides the current ModuleView from the visualization. + * + * This method is often called when a widget representing the ModuleView + * leaves a visualization (either being removed from a scene, + * or not being part of a new scene.) + * + * Each ModuleView should implement/override this, and should + * provide (at least) the following functionality: + * - hide the container/elements (to prevent overlap/event-disruption), + * - unset isDrawn so that next time we know to fully redraw, etc. + * + * Optionally, it should also empty the DOM Node/SVG to save memory + * + * @method clear + * @return {void} + */ + clear: function() {}, + + /** + * destroy totally removes the current ModuleView from the visualization. + * This should entirely empty and remove any DOM-or-SVG Elements from the + * document. + * + * This method is rarely called unless the Visualizer is being removed entirely. + * + * Each ModuleView should implement/override this function. + * + * @method destroy + * @return {void} + */ + destroy: function() { + return this.clear(); + }, + + /** + * run is used used to execute a widget's operation on a ModuleView. + * Many times additional parameters are passed, these assist in updating a + * ModuleView by providing the widget's specifications (container, width, + * any data limitations, etc.) + * + * If params includes a `container` key, its value will be used to define + * this particular ModuleView's container viewport. + * + * @method run + * @param {String} operation The method on this ModuleView to run. + * @param {Object} [params] Any additional specifications for the operation. + * @return {void} + */ + run: function(operation, params) { + if (params == null) { + params = {}; + } + if (params.container) { + this.updateSelector(params.container); + } + this._presetContainerAttrs(params); + return typeof this[operation] === "function" ? this[operation](params) : void 0; + }, + + /** + * updateSelector takes a new containerSelector parameter, and uses it to + * change this ModuleView's viewport. It also updates the `previousSelectors` + * history to contain the selector that was used before this method was called. + * + * @method updateSelector + * @param {String} containerSelector The new selector to use as a viewport + * @return {void} + */ + updateSelector: function(containerSelector) { + var _oldSel; + if (containerSelector !== (_oldSel = this.get('containerSelector'))) { + this.clear(); + this.get('previousSelectors').push(_oldSel); + return this.set('containerSelector', containerSelector); + } + }, + + /** + * $container is a method which returns the ModuleView's container/viewport + * JQuery Object. + * + * If a parameter is passed, $container will attempt to find that parameter + * withing the structure of its container object. + * + * @method $container + * @param {String} [selector] A CSS selector to use to find nodes within this World + * @return {JQuery Object} + */ + $container: function(selector) { + var spacedSelector; + spacedSelector = selector ? " " + selector : ""; + return this.get('visualizer.world').$("" + (this.get('containerSelector')) + spacedSelector); + }, + + /** + * hardReset clears out the ModuleView and tells it that dimensionsDidChange, + * so the next redraw/execution is a fresh one (fully recalculated). + * + * This is automatically called when the ModuleView's data changes. + * + * @method hardReset + * @return {void} + */ + hardReset: (function() { + this.set('dimensionsDidChange', true); + return this.run('clear'); + }).observes('data'), + + /** + * widgetParamedOutlineCSS provides an Object where keys/values map to CSS attributes + * relevant to the container ONLY for manually specified dimensions/positions. + * + * The point of this method is to provide access to data that can be used to set the + * style of the DOM element containing this ModuleView to the manually-set specifications. + * + * If a developer opts to simply use a container's size/position, this will return an + * empty object. + * + * @method widgetParamedOutlineCSS + * @param {Object} [params] Any additional specifications for the operation + * @return {Object} A collection of manually-specified size/position values + */ + widgetParamedOutlineCSS: function(params) { + var cssRules, styleType, _i, _len, _ref; + if (params == null) { + params = {}; + } + cssRules = {}; + _ref = ['width', 'height', 'left', 'top']; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + styleType = _ref[_i]; + if (params[styleType] != null) { + cssRules[styleType] = "" + (this.get(styleType)) + "px"; + } + } + return cssRules; + }, + + /** + * width getter/setter. Uses _updateDimension to coerce the set value + * to an expected format (as well as to determine whether a dimension changed). + * + * @method width + * @param {String} key ALWAYS set to "width" + * @param [value] A value for setting (undefined for getting) + * @return {Integer} A collection of manually-specified size/position values + * @private ( ONLY access via `.get('width')` or `.set('width', value)` !!!) + */ + width: (function(key, value) { + return this._updateDimension(key, value); + }).property(), + + /** + * height getter/setter. Uses _updateDimension to coerce the set value + * to an expected format (as well as to determine whether a dimension changed). + * + * @method height + * @param {String} key ALWAYS set to "height" + * @param [value] A value for setting (undefined for getting) + * @return {Integer} The updated value + * @private ( ONLY access via `.get('height')` or `.set('height', value)` !!!) + */ + height: (function(key, value) { + return this._updateDimension(key, value); + }).property(), + + /** + * _updateDimension is used when setting width or height. + * It accepts a key (which should be set to "width" or "height"), + * and a value. + * + * The value is rounded down to the nearest integer to keep the DOM clean, + * and to keep determining changes simple. + * + * If the value isn't the same as this ModuleView's previous value for the + * same key property, dimensionsDidChange flag will be set true so that the + * ModuleView knows to perform its next operation with full calculations. + * + * @method _updateDimension + * @param {String} key Either "width" or "height" + * @param [value] A value for setting (undefined if just getting) + * @return {Integer} The updated value + * @private ( used by width/height setters ) + */ + _updateDimension: function(key, value) { + var previousValue; + if ((value != null)) { + value = Math.floor(value); + if (value !== (previousValue = this.get(key))) { + this.set('dimensionsDidChange', true); + } + } + return value; + }, + + /** + * _presetContainerAttrs is used when running an operation to ensure that + * required attributes based on the viewport (such as available width/height) + * for visualization are set. + * + * If width or height are manually specified, this will not update that attribute - + * in these cases, the ModuleView should know how to handle explicit dimensions. + * The "resizable mixin" can help with this (more details in _resizable_mixin file) + * + * @method _presetContainerAttrs + * @param {Object} [params] Any additional specifications for the operation. + * @return {void} + */ + _presetContainerAttrs: function(params) { + var container; + if (params == null) { + params = {}; + } + if (!((params.width != null) && (params.height != null))) { + container = this.$container(); + if (params.width == null) { + this.set('width', container.width()); + } + if (params.height == null) { + return this.set('height', container.height()); + } + } + } + }); + +}).call(this); + + +/** + * ResizableMixin + * A helper mixin for ModuleViews which can have their size set manually. + * This simplifies specifying size, padding, and position of a ModuleView + * viewport container, and allows values to be set either relatively + * (as a percentage of the Visualizer's World), or explicitly (e.g. "50px" or 50) + * + * @class ResizableMixin + * @extends Ember.Mixin + * @extensionfor Visualizer.ModuleView + * @namespace Visualizer.ModuleView + */ + +(function() { + Visualizer.ModuleView.ResizableMixin = Ember.Mixin.create({ + + /** + * run hijacks the ModuleView's run method to first attempt to update + * the viewport's size based on the parameter specifications. + * After attempting to update the size/position of the viewport, + * the ModuleView's run function is allowed to proceed. + * + * @method run + * @param {String} operation The method on this ModuleView to run. + * @param {Object} [params] Any additional specifications for the operation. + * @return {void} + */ + run: function(operation, params) { + if (params == null) { + params = {}; + } + this._updateSize(params); + return this._super(operation, params); + }, + + /** + * _updateSize scans the widget-sent params for manually-set + * size/position values, uses these to set up the ModuleView's + * relevant attributes. + * + * @method _updateSize + * @param {Object} [params] Any additional specifications for the operation. + * @return {void} + * @private (called when `run` attempts to execute an operation) + */ + _updateSize: function(params) { + var dimension, _i, _len, _ref, _results; + if (params == null) { + params = {}; + } + this.get("visualizer.world").resize(); + _ref = [ + { + key: 'width' + }, { + key: 'height' + }, { + key: "left", + req: "width" + }, { + key: "top", + req: "height" + } + ]; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + dimension = _ref[_i]; + _results.push(this._tryUpdateValue(dimension.key, params[dimension.key], params, dimension.req)); + } + return _results; + }, + + /** + * _tryUpdateValue given a sizing/position-defining key and value, + * this method attempts to parse the value and, if it's a relative + * percentage or String, coerce it to an integer. + * + * Allows values to be explicit (e.g. 50, or "50px"), or relative + * to the Visualizer's World (e.g. "50%"). Parameter relativeReq is + * used to specify which of the World's parameters should be used to + * determine a relative size (e.g. "left" uses the World's "width"). + * + * params may also specify an amount of padding. + * + * @method _tryUpdateValue + * @param {String} key The CSS property being set (width, height, left, top) + * @param {String} val The value to use for setting the ModuleView property + * @param {Object} [params] Any additional specifications for the operation. + * @param {String} [relativeReq=key] The relevant property (to the key) on the World + * @return {Boolean} True if the dimension changed, false otherwise. + * @private (called when `_updateSize` attempts to execute) + */ + _tryUpdateValue: function(key, val, params, relativeReq) { + var newSize, padding; + if (params == null) { + params = {}; + } + if (relativeReq == null) { + relativeReq = key; + } + if (val != null) { + if (params.padding != null) { + padding = Visualizer.Utils.relativeSizeString(params.padding, this.get("visualizer.world." + relativeReq)); + } + padding = padding != null ? padding : 15; + newSize = Math.floor(Visualizer.Utils.relativeSizeString(val, this.get("visualizer.world." + relativeReq)) - padding); + if (isFinite(newSize) && (this.get(key) !== newSize)) { + this.set(key, newSize); + return true; + } + } + return false; + } + }); + +}).call(this); diff --git a/documentation/classes/NativeClass.Array.html b/documentation/classes/NativeClass.Array.html index 85463b5..682cf93 100644 --- a/documentation/classes/NativeClass.Array.html +++ b/documentation/classes/NativeClass.Array.html @@ -228,7 +228,7 @@

    removeInstancesOf

    - build/js/j-visualizer.js:916 + build/js/j-visualizer.js:924

    @@ -325,7 +325,7 @@

    shuffleVals

    - build/js/j-visualizer.js:940 + build/js/j-visualizer.js:948

    @@ -400,7 +400,7 @@

    values

    - build/js/j-visualizer.js:970 + build/js/j-visualizer.js:978

    diff --git a/documentation/classes/NativeClass.String.html b/documentation/classes/NativeClass.String.html index 933eef0..1340603 100644 --- a/documentation/classes/NativeClass.String.html +++ b/documentation/classes/NativeClass.String.html @@ -262,7 +262,7 @@

    advancedIndexOf

    - build/js/j-visualizer.js:1054 + build/js/j-visualizer.js:1062

    @@ -394,7 +394,7 @@

    beginsWith

    - build/js/j-visualizer.js:1101 + build/js/j-visualizer.js:1109

    @@ -520,7 +520,7 @@

    capitalizeLetter

    - build/js/j-visualizer.js:1121 + build/js/j-visualizer.js:1129

    @@ -636,7 +636,7 @@

    includes

    - build/js/j-visualizer.js:1081 + build/js/j-visualizer.js:1089

    @@ -752,7 +752,7 @@

    removeInitialUnderscore

    - build/js/j-visualizer.js:1159 + build/js/j-visualizer.js:1167

    @@ -825,7 +825,7 @@

    titleize

    - build/js/j-visualizer.js:1143 + build/js/j-visualizer.js:1151

    @@ -914,7 +914,7 @@

    truncateTo

    - build/js/j-visualizer.js:1025 + build/js/j-visualizer.js:1033

    diff --git a/documentation/classes/Visualizer.Module.html b/documentation/classes/Visualizer.Module.html index 569adeb..5a8063c 100644 --- a/documentation/classes/Visualizer.Module.html +++ b/documentation/classes/Visualizer.Module.html @@ -114,7 +114,7 @@

    Visualizer.Module Class

    @@ -294,7 +294,7 @@

    _groupedBy

    - build/js/j-visualizer.js:1666 + build/js/j-visualizer.js:1676

    @@ -405,7 +405,7 @@

    forceLimit

    - build/js/j-visualizer.js:1612 + build/js/j-visualizer.js:1622

    @@ -513,7 +513,7 @@

    groupedBy

    - build/js/j-visualizer.js:1634 + build/js/j-visualizer.js:1644

    @@ -617,7 +617,7 @@

    requestRedraw

    - build/js/j-visualizer.js:1596 + build/js/j-visualizer.js:1606

    @@ -684,7 +684,7 @@

    content

    - build/js/j-visualizer.js:1532 + build/js/j-visualizer.js:1542

    @@ -735,7 +735,7 @@

    dataset

    - build/js/j-visualizer.js:1550 + build/js/j-visualizer.js:1560

    @@ -784,7 +784,7 @@

    maxLength

    - build/js/j-visualizer.js:1520 + build/js/j-visualizer.js:1530

    @@ -832,7 +832,7 @@

    moduleViews

    - build/js/j-visualizer.js:1565 + build/js/j-visualizer.js:1575

    @@ -880,7 +880,7 @@

    visualizer

    - build/js/j-visualizer.js:1511 + build/js/j-visualizer.js:1521

    diff --git a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html index a8365b0..4ed20bd 100644 --- a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html +++ b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html @@ -114,7 +114,7 @@

    Visualizer.ModuleView.ResizableMixin Class

    @@ -261,7 +261,7 @@

    _tryUpdateValue

    - build/js/j-visualizer.js:2107 + build/js/j-visualizer.js:2119

    @@ -427,7 +427,7 @@

    _updateSize

    - build/js/j-visualizer.js:2070 + build/js/j-visualizer.js:2082

    @@ -541,7 +541,7 @@

    run

    - build/js/j-visualizer.js:2051 + build/js/j-visualizer.js:2063

    diff --git a/documentation/classes/Visualizer.ModuleView.html b/documentation/classes/Visualizer.ModuleView.html index 43e2a5e..d473d07 100644 --- a/documentation/classes/Visualizer.ModuleView.html +++ b/documentation/classes/Visualizer.ModuleView.html @@ -114,7 +114,7 @@

    Visualizer.ModuleView Class

    @@ -356,7 +356,7 @@

    $container

    - build/js/j-visualizer.js:1886 + build/js/j-visualizer.js:1896

    @@ -465,7 +465,7 @@

    _presetContainerAttrs

    - build/js/j-visualizer.js:2004 + build/js/j-visualizer.js:2014

    @@ -584,7 +584,7 @@

    _updateDimension

    - build/js/j-visualizer.js:1975 + build/js/j-visualizer.js:1985

    @@ -705,7 +705,7 @@

    clear

    - build/js/j-visualizer.js:1808 + build/js/j-visualizer.js:1818

    @@ -784,7 +784,7 @@

    destroy

    - build/js/j-visualizer.js:1827 + build/js/j-visualizer.js:1837

    @@ -859,7 +859,7 @@

    hardReset

    - build/js/j-visualizer.js:1903 + build/js/j-visualizer.js:1913

    @@ -950,7 +950,7 @@

    height

    - build/js/j-visualizer.js:1961 + build/js/j-visualizer.js:1971

    @@ -1081,7 +1081,7 @@

    run

    - build/js/j-visualizer.js:1843 + build/js/j-visualizer.js:1853

    @@ -1208,7 +1208,7 @@

    updateSelector

    - build/js/j-visualizer.js:1868 + build/js/j-visualizer.js:1878

    @@ -1315,7 +1315,7 @@

    widgetParamedOutlineCSS

    - build/js/j-visualizer.js:1917 + build/js/j-visualizer.js:1927

    @@ -1436,7 +1436,7 @@

    width

    - build/js/j-visualizer.js:1947 + build/js/j-visualizer.js:1957

    @@ -1546,7 +1546,7 @@

    arrangedContent

    - build/js/j-visualizer.js:1767 + build/js/j-visualizer.js:1777

    @@ -1595,7 +1595,7 @@

    containerSelector

    - build/js/j-visualizer.js:1718 + build/js/j-visualizer.js:1728

    @@ -1647,7 +1647,7 @@

    data

    - build/js/j-visualizer.js:1758 + build/js/j-visualizer.js:1768

    @@ -1692,7 +1692,7 @@

    dimensionsDidChange

    - build/js/j-visualizer.js:1781 + build/js/j-visualizer.js:1791

    @@ -1741,7 +1741,7 @@

    module

    - build/js/j-visualizer.js:1709 + build/js/j-visualizer.js:1719

    @@ -1786,7 +1786,7 @@

    previousSelectors

    - build/js/j-visualizer.js:1736 + build/js/j-visualizer.js:1746

    @@ -1833,7 +1833,7 @@

    visualizer

    - build/js/j-visualizer.js:1749 + build/js/j-visualizer.js:1759

    diff --git a/documentation/classes/Visualizer.Scene.html b/documentation/classes/Visualizer.Scene.html index 7d7bb4a..7dabe94 100644 --- a/documentation/classes/Visualizer.Scene.html +++ b/documentation/classes/Visualizer.Scene.html @@ -159,6 +159,13 @@

    Methods

      +
    • + _runWidget + + + +
    • +
    • clearUnusedViews @@ -260,8 +267,8 @@

      Properties

      Methods

      -
      -

      clearUnusedViews

      +
      +

      _runWidget

      () @@ -276,6 +283,8 @@

      clearUnusedViews

      + private + @@ -296,7 +305,7 @@

      clearUnusedViews

      - build/js/j-visualizer.js:680 + build/js/j-visualizer.js:730

      @@ -307,9 +316,9 @@

      clearUnusedViews

      -

      clearUnusedViews sends a "clear" request to each ModuleView used by the current -instance of Visualizer, which isn't used in any of this scene's widgets. -In essence it ensures that any Views that are not currently in use are cleansed.

      +

      _runWidget runs the current scene's operation for a single widget. +Waits for repeating events to prevent multiple refreshes on the +same dimensions/parameters.

      @@ -330,6 +339,65 @@

      Returns:

      +
      + + +
      +

      clearUnusedViews

      + + + () + + + + + + + + + + + + + + chainable + + + + +
      + + + +

      + + Defined in + + + + + build/js/j-visualizer.js:680 + +

      + + + + + +
      + +
      +

      clearUnusedViews sends a "clear" request to each ModuleView used by the current +instance of Visualizer, which isn't used in any of this scene's widgets. +In essence it ensures that any Views that are not currently in use are cleansed.

      + +
      + + + + + +
      @@ -369,7 +437,7 @@

      reload

      - build/js/j-visualizer.js:745 + build/js/j-visualizer.js:753

      @@ -415,10 +483,6 @@

      runWidgets

      - - Void - - @@ -429,6 +493,8 @@

      runWidgets

      + chainable + @@ -464,18 +530,6 @@

      runWidgets

      -
      -

      Returns:

      - -
      - - - Void: - - -
      -
      - diff --git a/documentation/classes/Visualizer.Utils.html b/documentation/classes/Visualizer.Utils.html index aa9498d..4db6fcb 100644 --- a/documentation/classes/Visualizer.Utils.html +++ b/documentation/classes/Visualizer.Utils.html @@ -110,7 +110,7 @@

      Visualizer.Utils Class

      @@ -311,7 +311,7 @@

      boundedVal

      - build/js/j-visualizer.js:1263 + build/js/j-visualizer.js:1273

      @@ -454,7 +454,7 @@

      cloneArray

      - build/js/j-visualizer.js:1409 + build/js/j-visualizer.js:1419

      @@ -563,7 +563,7 @@

      existsWithValue

      - build/js/j-visualizer.js:1188 + build/js/j-visualizer.js:1196

      @@ -676,7 +676,7 @@

      intersectionCount

      - build/js/j-visualizer.js:1378 + build/js/j-visualizer.js:1388

      @@ -811,7 +811,7 @@

      intersectionSafe

      - build/js/j-visualizer.js:1345 + build/js/j-visualizer.js:1355

      @@ -939,7 +939,7 @@

      isArray

      - build/js/j-visualizer.js:1314 + build/js/j-visualizer.js:1324

      @@ -1052,7 +1052,7 @@

      maxVal

      - build/js/j-visualizer.js:1247 + build/js/j-visualizer.js:1257

      @@ -1181,7 +1181,7 @@

      minVal

      - build/js/j-visualizer.js:1231 + build/js/j-visualizer.js:1241

      @@ -1310,7 +1310,7 @@

      randBetween

      - build/js/j-visualizer.js:1284 + build/js/j-visualizer.js:1294

      @@ -1441,7 +1441,7 @@

      randIntBetween

      - build/js/j-visualizer.js:1302 + build/js/j-visualizer.js:1312

      @@ -1570,7 +1570,7 @@

      relativeSizeString

      - build/js/j-visualizer.js:1325 + build/js/j-visualizer.js:1335

      @@ -1713,7 +1713,7 @@

      waitForRepeatingEvents

      - build/js/j-visualizer.js:1199 + build/js/j-visualizer.js:1207

      diff --git a/documentation/classes/Visualizer.World.html b/documentation/classes/Visualizer.World.html index b5278c9..d908fa0 100644 --- a/documentation/classes/Visualizer.World.html +++ b/documentation/classes/Visualizer.World.html @@ -114,7 +114,7 @@

      Visualizer.World Class

      @@ -278,7 +278,7 @@

      $

      - build/js/j-visualizer.js:793 + build/js/j-visualizer.js:801

      @@ -378,7 +378,7 @@

      _bindGlobalEvents

      - build/js/j-visualizer.js:833 + build/js/j-visualizer.js:841

      @@ -454,7 +454,7 @@

      _bindWorldEvents

      - build/js/j-visualizer.js:852 + build/js/j-visualizer.js:860

      @@ -530,7 +530,7 @@

      _handlePhasedButtonClick

      - build/js/j-visualizer.js:890 + build/js/j-visualizer.js:898

      @@ -606,7 +606,7 @@

      injectDefaultWorld

      - build/js/j-visualizer.js:870 + build/js/j-visualizer.js:878

      @@ -680,7 +680,7 @@

      resize

      - build/js/j-visualizer.js:810 + build/js/j-visualizer.js:818

      @@ -748,7 +748,7 @@

      loaded

      - build/js/j-visualizer.js:782 + build/js/j-visualizer.js:790

      diff --git a/documentation/classes/jQuery.fn.html b/documentation/classes/jQuery.fn.html index b66a22c..e2de852 100644 --- a/documentation/classes/jQuery.fn.html +++ b/documentation/classes/jQuery.fn.html @@ -220,7 +220,7 @@

      addExpiringClass

      - build/js/j-visualizer.js:992 + build/js/j-visualizer.js:1000

      diff --git a/documentation/data.json b/documentation/data.json index 38514a4..5f52f6c 100644 --- a/documentation/data.json +++ b/documentation/data.json @@ -92,7 +92,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 768, + "line": 776, "description": "Visualizer World\nRepresents an Object used to manage an overview viewport for visualizations.", "extends": "Ember.Object" }, @@ -136,7 +136,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1175, + "line": 1183, "description": "Visualizer Utils\nA collection of common utility functions used in the Visualizer." }, "Visualizer.Module": { @@ -149,7 +149,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1494, + "line": 1504, "description": "Visualizer Module\nA Visualizer Module is a collection of data used for Visualization.\nIt keeps access slightly standardized and offers several helpers to\nsimplify data management.\n\nEach Module also has a collection of relevant ModuleViews - Objects that\ndefine and take care of how a given Module's data can be displayed.", "extends": "Ember.ArrayController" }, @@ -163,7 +163,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1694, + "line": 1704, "description": "Visualizer ModuleView\nModule Views encapsulate the functionality for drawing,\ncoloring, and handling events on visualizations of the data\nprovided by a Module. These are the \"visual\" side of\ndata visualizations.", "extends": "Ember.Object" }, @@ -179,7 +179,7 @@ ], "namespace": "Visualizer.ModuleView", "file": "build/js/j-visualizer.js", - "line": 2035, + "line": 2047, "description": "ResizableMixin\nA helper mixin for ModuleViews which can have their size set manually.\nThis simplifies specifying size, padding, and position of a ModuleView\nviewport container, and allows values to be set either relatively\n(as a percentage of the Visualizer's World), or explicitly (e.g. \"50px\" or 50)", "extends": "Ember.Mixin" } @@ -752,10 +752,7 @@ "description": "clearUnusedViews sends a \"clear\" request to each ModuleView used by the current\ninstance of Visualizer, which isn't used in any of this scene's widgets.\nIn essence it ensures that any Views that are not currently in use are cleansed.", "itemtype": "method", "name": "clearUnusedViews", - "return": { - "description": "", - "type": "Void" - }, + "chainable": 1, "class": "Visualizer.Scene", "namespace": "Visualizer" }, @@ -765,16 +762,28 @@ "description": "runWidgets iterated this scene's widgets, and requests that the ModuleView specified\nfor each widget executes the operation specified for each widget.\n\nFor example, it may tell one ModuleView, a word cloud, to draw itself, and\nanother ModuleView, a set of icons, to group themselves by common-words.", "itemtype": "method", "name": "runWidgets", + "chainable": 1, + "class": "Visualizer.Scene", + "namespace": "Visualizer" + }, + { + "file": "build/js/j-visualizer.js", + "line": 730, + "description": "_runWidget runs the current scene's operation for a single widget.\nWaits for repeating events to prevent multiple refreshes on the\nsame dimensions/parameters.", + "itemtype": "method", + "name": "_runWidget", "return": { "description": "", "type": "Void" }, + "access": "private", + "tagname": "", "class": "Visualizer.Scene", "namespace": "Visualizer" }, { "file": "build/js/j-visualizer.js", - "line": 745, + "line": 753, "description": "reload initiates the process of updating the visualization by cleaning out old Views\nand updating all current widgets.\n\nPrevents rapid-exectuion by delaying each request by an amount of time specified\n by property drawWait, and afterward only using the most recent request (as a debounce).", "itemtype": "method", "name": "reload", @@ -787,7 +796,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 782, + "line": 790, "description": "loaded is a boolean variable indicating whether or the world is\nprepared to hold a visualization.\n\nCurrently it simply check's whether the world JQuery object exists", "itemtype": "property", "name": "loaded", @@ -797,7 +806,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 793, + "line": 801, "description": "$ is a method which returns the world's JQuery Object, worldObj.\nIf a parameter is passed, $ will attempt to find that parameter\nwithing the structure of the worldObj.", "itemtype": "method", "name": "$", @@ -817,7 +826,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 810, + "line": 818, "description": "resize recalculates the width, height, top, and left properties of the\nworldObj DOM Element\n\nThis method is automatically called when a World is created.", "itemtype": "method", "name": "resize", @@ -830,7 +839,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 833, + "line": 841, "description": "_bindGlobalEvents binds this World's resize event to the window's resize,\nsuch that every time the window's size changes this World attempts to\nupdate its properties to reflect the new window.\n\nPrivate, since this method is automatically called when a World is created.", "itemtype": "method", "name": "_bindGlobalEvents", @@ -845,7 +854,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 852, + "line": 860, "description": "_bindWorldEvents binds and generic event listeners that\noccur within the World's domain\n\nPrivate, since this method is automatically called when a World is created\nas well as when the worldObj changes to reference a new area.", "itemtype": "method", "name": "_bindWorldEvents", @@ -860,7 +869,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 870, + "line": 878, "description": "injectDefaultWorld clears out the Visualizer World's contents, injects the basic\nvisualizer skeleton", "deprecated": true, "deprecationMessage": "@todo Deprecate this. ModuleViews should take care of this on a per-App basis...", @@ -875,7 +884,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 890, + "line": 898, "description": "_handlePhasedButtonClick is called when an element with class phasedButton\nis clicked. Adds a class 'disabledItem' to the element for 2 seconds;\nif the element is clicked again before the class 'disabledItem' class expires,\nthe click will be ignored.", "itemtype": "method", "name": "_handlePhasedButtonClick", @@ -890,7 +899,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 916, + "line": 924, "description": "removeInstancesOf removes traces of a provided value from an Array", "itemtype": "method", "name": "removeInstancesOf", @@ -909,7 +918,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 940, + "line": 948, "description": "shuffleVals - Fisher-Yates algorithm for shuffling arrays\nin-place. (Essentially goes through each slot in array and\nswitches its value with one from a random slot...)", "itemtype": "method", "name": "shuffleVals", @@ -922,7 +931,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 970, + "line": 978, "description": "values takes an Object and returns its values\n(similar to `.keys()`)", "itemtype": "method", "name": "values", @@ -935,7 +944,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 992, + "line": 1000, "description": "addExpiringClass adds a temporary class to a JQuery object.\nThe class has an expiry, after which it is removed.", "itemtype": "method", "name": "addExpiringClass", @@ -964,7 +973,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1025, + "line": 1033, "description": "truncateTo ensures a string is no longer than a given size limit.\n(In the case that it is longer, a suffix can be given for truncation)", "itemtype": "method", "name": "truncateTo", @@ -991,7 +1000,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1054, + "line": 1062, "description": "advancedIndexOf searches the object String for a parameter\nsubstring, allows additional options (such as case-insensitivity).", "itemtype": "method", "name": "advancedIndexOf", @@ -1017,7 +1026,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1081, + "line": 1089, "description": "includes searches the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "includes", @@ -1044,7 +1053,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1101, + "line": 1109, "description": "beginsWith searches the start of the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "beginsWith", @@ -1071,7 +1080,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1121, + "line": 1129, "description": "capitalizeLetter is a String capitalize function adapted from\nhttp://stackoverflow.com/a/3291856/624590 .\nCapitalizes the letter at position n of the object String.", "itemtype": "method", "name": "capitalizeLetter", @@ -1093,7 +1102,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1143, + "line": 1151, "description": "titleize creates a title-formatted copy of a String", "itemtype": "method", "name": "titleize", @@ -1106,7 +1115,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1159, + "line": 1167, "description": "removeInitialUnderscore removes the first leading underscore from a String", "itemtype": "method", "name": "removeInitialUnderscore", @@ -1119,7 +1128,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1188, + "line": 1196, "description": "existsWithValue checks if a values isn't null/undefined", "itemtype": "method", "name": "existsWithValue", @@ -1139,7 +1148,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1199, + "line": 1207, "description": "waitForRepeatingEvents is a debounce-like function for preventing\nmultiple execution. It should be called with a function and an\namount of time to wait. It can also be provided a timer name so as\nto namespace the blocked items. It can also be called with an Object\ntimer set to allow different objects to not prevent the execution of\nfunctions in others.", "itemtype": "method", "name": "waitForRepeatingEvents", @@ -1174,7 +1183,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1231, + "line": 1241, "description": "minVal takes two parameters, returns the smaller", "itemtype": "method", "name": "minVal", @@ -1199,7 +1208,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1247, + "line": 1257, "description": "maxVal takes two parameters, returns the larger", "itemtype": "method", "name": "maxVal", @@ -1224,7 +1233,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1263, + "line": 1273, "description": "boundedVal takes three parameters: an item, the lower bound,\nand the upper bound. If the item is between the bounds,\nthe item is returned, otherwise the failed bound is returned.", "itemtype": "method", "name": "boundedVal", @@ -1254,7 +1263,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1284, + "line": 1294, "description": "randBetween provides a random number between two values.", "itemtype": "method", "name": "randBetween", @@ -1283,7 +1292,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1302, + "line": 1312, "description": "randIntBetween provides a random (rounded) Integer between two values.", "itemtype": "method", "name": "randIntBetween", @@ -1308,7 +1317,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1314, + "line": 1324, "description": "isArray returns a flag of whether the parameter is of type Array", "itemtype": "method", "name": "isArray", @@ -1328,7 +1337,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1325, + "line": 1335, "description": "relativeSizeString parses an input size for either an explicit\nvalue, or a value in relationship to some parent value.\nE.g. \"50%\" of 900 = 450, \"50\" = 50, \"50px\" = 50", "itemtype": "method", "name": "relativeSizeString", @@ -1353,7 +1362,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1345, + "line": 1355, "description": "intersectionSafe is simple intersection code, iterates along two\nsorted arrays incrementing the index of the smaller value\n(if values are equal, it is part of intersection, and so store position and iterate both).\nReturns array of indices of intersecting values with respect to the first array passed.\n\nintersectionSafe is modified from code found on StackOverflow at:\nhttp://stackoverflow.com/a/1885660/624590", "itemtype": "method", "name": "intersectionSafe", @@ -1378,7 +1387,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1378, + "line": 1388, "description": "intersectionCount is a modified form of intersectionSafe that simply\nincrements a counter instead of building an intersection Array.\n(Faster because increments rather than pushing values to array,\nalso more memory efficient; JSPerf suggests 100% performance increase\n- beneficial for large datasets...)", "itemtype": "method", "name": "intersectionCount", @@ -1403,7 +1412,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1409, + "line": 1419, "description": "cloneArray creates a copy of an Array.", "deprecated": true, "deprecationMessage": "use Array.copy instead.", @@ -1425,7 +1434,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1511, + "line": 1521, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1436,7 +1445,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1520, + "line": 1530, "description": "maxLength is an integer size of how much data should be displayed.\nSometimes a project will collect more data than is practical to display\nto the user (either because it will be confusing, or otherwise too slow);\nthis property represents that limit.", "itemtype": "property", "name": "maxLength", @@ -1447,7 +1456,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1532, + "line": 1542, "description": "content is the full set of data (in Array , Ember.Array) form that is\navailable to this Module.\n\nNote: this attribute should only be accessed from the\ndata-management side of your app; it's where you dump data, and it's\nwhat you generally access for front-end filtering. This Module's\nModuleViews should not access the content, however - they should access\nthe dataset (which is a subset of content).", "itemtype": "property", "name": "content", @@ -1458,7 +1467,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1550, + "line": 1560, "description": "dataset is the subset of content used for current visualization.\nIt can potentially be the exact same data as content, in full,\nbut it can also be a limited/truncated version (often using the\nmaxLength property). It may also filtered down by properties, etc.\n\nModuleViews should only look here for their Module data.", "itemtype": "property", "name": "dataset", @@ -1469,7 +1478,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1565, + "line": 1575, "description": "moduleViews an object dictionary/map of Visualizer ModuleView objects,\neach of which must be relevant to this particular Module's data structuring.\n\nFor example, if this Module is a set of words with frequencies, a WordCloud\nmay be an applicable ModuleView.", "itemtype": "property", "name": "moduleViews", @@ -1480,7 +1489,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1580, + "line": 1590, "description": "init is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", "is_constructor": 1, "class": "Visualizer.Module", @@ -1488,7 +1497,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1596, + "line": 1606, "description": "requestRedraw sends a request to the current scene\nto redraw the widgets relevant to this module (and no others).", "itemtype": "method", "name": "requestRedraw", @@ -1501,7 +1510,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1612, + "line": 1622, "description": "forceLimit sorts the current data by a provided key, and selects only the\nfirst maxLength (property) items for this Module's dataset, ensuring that\nthe limit to the viewed-data's size is enforced.", "todo": [ "consider implementing a n-item max-heap data structure instead of sorting" @@ -1526,7 +1535,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1634, + "line": 1644, "description": "groupedBy creates a cached property on the Module to retrieve its data\nin the form of a two-dimensional Array, where the sub arrays contain\nthis Module's dataset split into sets that share a common (passed) property.\n\nThe outside Array is sorted by length, so the largest groups are at the start.\n\nSince the result is cached, it will only be recomputed when the dataset changes,\nkeeping this efficient. The first time you use groupBy for any given property\nafter the data changes (or is created) runs O(nlogn), but each subsequent access\nis simply O(1) as it simply grabs the previous data. Say what??? :P", "itemtype": "method", "name": "groupedBy", @@ -1546,7 +1555,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1666, + "line": 1676, "description": "_groupedBy groups the Module's dataset by a given property, returning\nan unsorted, two-dimensional array.\n\nThis method should not be called explicitly, instead developers should\ngo through the `groupedBy` method (no leading underscore), which\ncaches the groups (making redraws far more efficient)", "itemtype": "method", "name": "_groupedBy", @@ -1566,7 +1575,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1709, + "line": 1719, "description": "module is a reference to the parent Module for this ModuleView instance.", "itemtype": "property", "name": "module", @@ -1577,7 +1586,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1718, + "line": 1728, "description": "containerSelector is a string CSS selector used for finding\nthis ModuleView's window in a Visualization.\n\nOften unique, but occasionally multiple ModuleViews will be\nwritten to share a container.\n\nOften this property will be specified in a widget's parameters,\notherwise child classes to ModuleView should specify defaults.\nIf a widget does specify a `container` param, it will be set and used\nrunning any operation.", "itemtype": "property", "name": "containerSelector", @@ -1588,7 +1597,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1736, + "line": 1746, "description": "previousSelectors is a list history of selectors that were\npreviously set as this instance of a ModuleView's containerSelector.\n\nThis may be useful for navigation, or for cleaning up after a visualization.", "itemtype": "property", "name": "previousSelectors", @@ -1598,7 +1607,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1749, + "line": 1759, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1609,7 +1618,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1758, + "line": 1768, "description": "data is a reference to the visible data for visualization.", "itemtype": "property", "name": "data", @@ -1620,7 +1629,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1767, + "line": 1777, "description": "arrangedContent is a reference to all Module data (sorted/arranged).\nThis property should only seldom be accessed because it includes\ndata which is deemed irrelevant by the Module (filtered, etc.)\n\nIt may, however, be useful if a View decides to animate old data away\nupon filtering / limiting its viewable data.", "itemtype": "property", "name": "arrangedContent", @@ -1631,7 +1640,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1781, + "line": 1791, "description": "dimensionsDidChange is a flag used by ModuleViews to decide how much\nprocessing is required when they run an operation.\n\nIf all dimensions, including visible data, width, and height, are\nunchanged, often times the old Visualization can simply be shown.\n\nSet to true by default, so that ModuleViews can have a proper first-draw.", "itemtype": "property", "name": "dimensionsDidChange", @@ -1641,7 +1650,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1795, + "line": 1805, "description": "init is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", "is_constructor": 1, "class": "Visualizer.ModuleView", @@ -1649,7 +1658,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1808, + "line": 1818, "description": "clear cleanses/hides the current ModuleView from the visualization.\n\nThis method is often called when a widget representing the ModuleView\nleaves a visualization (either being removed from a scene,\nor not being part of a new scene.)\n\nEach ModuleView should implement/override this, and should\nprovide (at least) the following functionality:\n - hide the container/elements (to prevent overlap/event-disruption),\n - unset isDrawn so that next time we know to fully redraw, etc.\n\nOptionally, it should also empty the DOM Node/SVG to save memory", "itemtype": "method", "name": "clear", @@ -1662,7 +1671,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1827, + "line": 1837, "description": "destroy totally removes the current ModuleView from the visualization.\nThis should entirely empty and remove any DOM-or-SVG Elements from the\ndocument.\n\nThis method is rarely called unless the Visualizer is being removed entirely.\n\nEach ModuleView should implement/override this function.", "itemtype": "method", "name": "destroy", @@ -1675,7 +1684,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1843, + "line": 1853, "description": "run is used used to execute a widget's operation on a ModuleView.\nMany times additional parameters are passed, these assist in updating a\nModuleView by providing the widget's specifications (container, width,\nany data limitations, etc.)\n\nIf params includes a `container` key, its value will be used to define\nthis particular ModuleView's container viewport.", "itemtype": "method", "name": "run", @@ -1701,7 +1710,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1868, + "line": 1878, "description": "updateSelector takes a new containerSelector parameter, and uses it to\nchange this ModuleView's viewport. It also updates the `previousSelectors`\nhistory to contain the selector that was used before this method was called.", "itemtype": "method", "name": "updateSelector", @@ -1721,7 +1730,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1886, + "line": 1896, "description": "$container is a method which returns the ModuleView's container/viewport\nJQuery Object.\n\nIf a parameter is passed, $container will attempt to find that parameter\nwithing the structure of its container object.", "itemtype": "method", "name": "$container", @@ -1742,7 +1751,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1903, + "line": 1913, "description": "hardReset clears out the ModuleView and tells it that dimensionsDidChange,\nso the next redraw/execution is a fresh one (fully recalculated).\n\nThis is automatically called when the ModuleView's data changes.", "itemtype": "method", "name": "hardReset", @@ -1755,7 +1764,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1917, + "line": 1927, "description": "widgetParamedOutlineCSS provides an Object where keys/values map to CSS attributes\nrelevant to the container ONLY for manually specified dimensions/positions.\n\nThe point of this method is to provide access to data that can be used to set the\nstyle of the DOM element containing this ModuleView to the manually-set specifications.\n\nIf a developer opts to simply use a container's size/position, this will return an\nempty object.", "itemtype": "method", "name": "widgetParamedOutlineCSS", @@ -1776,7 +1785,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1947, + "line": 1957, "description": "width getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "width", @@ -1803,7 +1812,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1961, + "line": 1971, "description": "height getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "height", @@ -1830,7 +1839,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1975, + "line": 1985, "description": "_updateDimension is used when setting width or height.\nIt accepts a key (which should be set to \"width\" or \"height\"),\nand a value.\n\nThe value is rounded down to the nearest integer to keep the DOM clean,\nand to keep determining changes simple.\n\nIf the value isn't the same as this ModuleView's previous value for the\nsame key property, dimensionsDidChange flag will be set true so that the\nModuleView knows to perform its next operation with full calculations.", "itemtype": "method", "name": "_updateDimension", @@ -1857,7 +1866,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2004, + "line": 2014, "description": "_presetContainerAttrs is used when running an operation to ensure that\nrequired attributes based on the viewport (such as available width/height)\nfor visualization are set.\n\nIf width or height are manually specified, this will not update that attribute -\nin these cases, the ModuleView should know how to handle explicit dimensions.\nThe \"resizable mixin\" can help with this (more details in _resizable_mixin file)", "itemtype": "method", "name": "_presetContainerAttrs", @@ -1878,7 +1887,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2051, + "line": 2063, "description": "run hijacks the ModuleView's run method to first attempt to update\nthe viewport's size based on the parameter specifications.\nAfter attempting to update the size/position of the viewport,\nthe ModuleView's run function is allowed to proceed.", "itemtype": "method", "name": "run", @@ -1904,7 +1913,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2070, + "line": 2082, "description": "_updateSize scans the widget-sent params for manually-set\nsize/position values, uses these to set up the ModuleView's\nrelevant attributes.", "itemtype": "method", "name": "_updateSize", @@ -1927,7 +1936,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2107, + "line": 2119, "description": "_tryUpdateValue given a sizing/position-defining key and value,\nthis method attempts to parse the value and, if it's a relative\npercentage or String, coerce it to an integer.\n\nAllows values to be explicit (e.g. 50, or \"50px\"), or relative\nto the Visualizer's World (e.g. \"50%\"). Parameter relativeReq is\nused to specify which of the World's parameters should be used to\ndetermine a relative size (e.g. \"left\" uses the World's \"width\").\n\nparams may also specify an amount of padding.", "itemtype": "method", "name": "_tryUpdateValue", @@ -1981,11 +1990,11 @@ }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", - "line": " build/js/j-visualizer.js:1580" + "line": " build/js/j-visualizer.js:1590" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", - "line": " build/js/j-visualizer.js:1795" + "line": " build/js/j-visualizer.js:1805" } ] } \ No newline at end of file diff --git a/documentation/files/build_js_j-visualizer.js.html b/documentation/files/build_js_j-visualizer.js.html index 297f917..008fd51 100644 --- a/documentation/files/build_js_j-visualizer.js.html +++ b/documentation/files/build_js_j-visualizer.js.html @@ -791,7 +791,7 @@

      File: build/js/j-visualizer.js

      * In essence it ensures that any Views that are not currently in use are cleansed. * * @method clearUnusedViews - * @return {void} + * @chainable */ clearUnusedViews: function() { var module, moduleName, view, viewName, _ref, _ref1; @@ -821,7 +821,7 @@

      File: build/js/j-visualizer.js

      * another ModuleView, a set of icons, to group themselves by common-words. * * @method runWidgets - * @return {void} + * @chainable */ runWidgets: function(widgets) { var widget, _i, _len; @@ -834,20 +834,28 @@

      File: build/js/j-visualizer.js

      } return this; }, + + /** + * _runWidget runs the current scene's operation for a single widget. + * Waits for repeating events to prevent multiple refreshes on the + * same dimensions/parameters. + * + * @method _runWidget + * @return {void} + * @private + */ _runWidget: function(widget) { var viewIdentifier; if (widget == null) { widget = {}; } viewIdentifier = "visualizer.modules." + widget.module + ".moduleViews." + widget.view; - Visualizer.Utils.waitForRepeatingEvents(((function(_this) { + return Visualizer.Utils.waitForRepeatingEvents(((function(_this) { return function() { - var moduleView; - moduleView = _this.get(viewIdentifier); - return moduleView != null ? moduleView.run(widget.operation, widget.params) : void 0; + var _ref; + return (_ref = _this.get(viewIdentifier)) != null ? _ref.run(widget.operation, widget.params) : void 0; }; })(this)), this.get("drawWait"), "Scene Redraw for " + viewIdentifier, this.get('visualizer.timers')); - return this; }, /** @@ -1323,14 +1331,16 @@

      File: build/js/j-visualizer.js

      var func, _timers; _timers = {}; return func = function(callback, timeout, timerName, timerSet) { + var storedTimer; if (timerName == null) { timerName = "default timer"; } if (timerSet == null) { timerSet = _timers; } - if (timerSet[timerName]) { - clearTimeout(timerSet[timerName]); + storedTimer = timerSet[timerName]; + if (storedTimer) { + clearTimeout(storedTimer); } return timerSet[timerName] = setTimeout(callback, timeout); }; @@ -2127,12 +2137,14 @@

      File: build/js/j-visualizer.js

      if (params == null) { params = {}; } - container = this.$container(); - if (params.width == null) { - this.set('width', container.width()); - } - if (params.height == null) { - return this.set('height', container.height()); + if (!((params.width != null) && (params.height != null))) { + container = this.$container(); + if (params.width == null) { + this.set('width', container.width()); + } + if (params.height == null) { + return this.set('height', container.height()); + } } } }); diff --git a/spec/modules/modules_spec.js b/spec/modules/modules_spec.js index a83e060..8d8479b 100644 --- a/spec/modules/modules_spec.js +++ b/spec/modules/modules_spec.js @@ -103,7 +103,7 @@ test('groupedBy', function() { // requestRedraw asyncTest('requestRedraw', 2, function() { - var _specWait = (_vis.get('currentScene.drawWait') + _vis.get('currentScene.fullRefreshWait')) * 1.1; + var _specWait = (_vis.get('currentScene.drawWait') + _vis.get('currentScene.fullRefreshWait')) + 50; var redrawModule = _vis.get('modules.0'); var ignoredModule = _vis.get('modules.2'); var _viewVal = 'moduleViews.specView.val'; diff --git a/src/module_views/_module_view.js.coffee b/src/module_views/_module_view.js.coffee index 92e68b6..6713e5a 100644 --- a/src/module_views/_module_view.js.coffee +++ b/src/module_views/_module_view.js.coffee @@ -292,6 +292,7 @@ # @return {void} ### _presetContainerAttrs: (params={}) -> - container = @$container() - (@set 'width', container.width()) unless params.width? - (@set 'height', container.height()) unless params.height? + unless params.width? and params.height? + container = @$container() + (@set 'width', container.width()) unless params.width? + (@set 'height', container.height()) unless params.height? diff --git a/src/utils/vis_utils.js.coffee b/src/utils/vis_utils.js.coffee index 9a493e5..a30653d 100644 --- a/src/utils/vis_utils.js.coffee +++ b/src/utils/vis_utils.js.coffee @@ -34,7 +34,8 @@ waitForRepeatingEvents: (()-> #Tested _timers = {} return func = (callback, timeout, timerName = "default timer", timerSet = _timers) -> - clearTimeout(timerSet[timerName]) if timerSet[timerName] + storedTimer = timerSet[timerName] + clearTimeout(storedTimer) if storedTimer timerSet[timerName] = setTimeout(callback, timeout) )() diff --git a/src/vis_scene.js.coffee b/src/vis_scene.js.coffee index a2780f1..df3646f 100644 --- a/src/vis_scene.js.coffee +++ b/src/vis_scene.js.coffee @@ -141,8 +141,7 @@ _runWidget: (widget={})-> viewIdentifier = "visualizer.modules.#{widget.module}.moduleViews.#{widget.view}" Visualizer.Utils.waitForRepeatingEvents (=> - moduleView = @get(viewIdentifier) - moduleView?.run(widget.operation, widget.params) + @get(viewIdentifier)?.run(widget.operation, widget.params) ), @get("drawWait"), "Scene Redraw for #{viewIdentifier}", @get('visualizer.timers') ###* From cfd69e615f501f33cfd4b78908c6ac3d3d66b0fd Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Tue, 29 Apr 2014 16:39:23 -0400 Subject: [PATCH 5/7] Remove a few long-deprecated functions (injectWorld / default world templates, as well as window-namespaced Utils) --- build/j-visualizer.min.js | 2 +- build/js/j-visualizer.js | 55 +--- documentation/classes/NativeClass.Array.html | 6 +- documentation/classes/NativeClass.String.html | 14 +- documentation/classes/Visualizer.Colorer.html | 36 +-- documentation/classes/Visualizer.Module.html | 20 +- .../Visualizer.ModuleView.ResizableMixin.html | 8 +- .../classes/Visualizer.ModuleView.html | 38 +-- documentation/classes/Visualizer.Scene.html | 26 +- documentation/classes/Visualizer.Utils.html | 26 +- documentation/classes/Visualizer.World.html | 99 +------- documentation/classes/Visualizer.html | 10 +- documentation/classes/jQuery.fn.html | 2 +- documentation/data.json | 237 ++++++++---------- .../files/build_js_j-visualizer.js.html | 55 +--- src/j_visualizer.js.coffee | 6 - src/utils/vis_utils.js.coffee | 18 -- src/vis_world.js.coffee | 23 -- 18 files changed, 210 insertions(+), 471 deletions(-) diff --git a/build/j-visualizer.min.js b/build/j-visualizer.min.js index d8dfdfa..fccbb2e 100644 --- a/build/j-visualizer.min.js +++ b/build/j-visualizer.min.js @@ -1 +1 @@ -(function(){var a,b={}.hasOwnProperty;this.Visualizer=a=Ember.Object.extend({world:null,scenes:Ember.computed(function(){return{}}),modules:Ember.computed(function(){return Ember.Object.create()}).property(),associations:Ember.computed(function(){return Ember.Object.create()}).property(),timers:Ember.computed(function(){return{}}),init:function(b){return this.useWorld(b),this.set("color",a.Colorer.create({visualizer:this}))},useWorld:function(b){return this.set("world",a.World.create({worldObj:$(b),visualizer:this}))},injectWorld:function(){return this.get("world").injectDefaultWorld()},addModule:function(a,b,c){var d;return d=a.create({visualizer:this,key:b}),this.set("modules."+b,d),null!=c&&this.set("modules."+b+".content",c),d.requestRedraw()},refresh:function(){var a;return this.get("world.loaded")&&null!=(a=this.get("currentScene"))?a.reload():void 0}.observes("currentScene","world.worldObj","world.loaded","world.width","world.height"),useScenes:function(b){var c,d,e,f;for(null==b&&(b=[]),a.Utils.isArray(b)||("undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Object({})-type input for useScenes is deprecated - please pass an Array instead..."),b=b.visualizer_scenes),f=[],d=0,e=b.length;e>d;d++)c=b[d],c.visualizer=this,f.push(this.set("scenes."+c.identifier,a.Scene.create(c)));return f},setScene:function(a){return this.set("currentScene",this.get("scenes."+a))},destroy:function(){var a,c,d,e;d=this.get("modules"),e=[];for(c in d)b.call(d,c)&&(a=d[c],e.push("function"==typeof a.destroy?a.destroy():void 0));return e}})}).call(this),function(){this.Visualizer.Colorer=Ember.Object.extend({visualizer:null,init:function(){return this.get("_assignedUniq"),this.get("uniquePalette"),this._setUniqueProps()},freshColorPalette:function(){return this.get("_colorScheme").copy()},fixed:function(a){return null==a&&(a=""),null!=a&&(a=""+a.toLowerCase()).length?this.get("_fixedVals."+a)||this._rotating_color(a):this.get("_defaultVal")},uniquePalette:Ember.computed(function(){return{}}),_assignedUniq:Ember.computed(function(){return{}}),unique:function(a,b){return null==a&&(a=""),null==b&&(b="main"),this.get("_assignedUniq."+b+"."+a)},_setUniqueProps:function(){return this.unique.next=function(a){return function(b){return null==b&&(b="main"),a.unique._prepareSet(b),a.get("uniquePalette."+b+".0")}}(this),this.unique.assign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&null==a.unique(b,c)?(d=a.get("uniquePalette."+c).shift()||a.get("_defaultAssigned"),a.set("_assignedUniq."+c+"."+b,d)):void 0}}(this),this.unique.unassign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&(d=a.unique(b,c),null!=d&&d!==a.get("_defaultUnassigned"))?(d!==a.get("_defaultAssigned")&&a.get("uniquePalette."+c).push(d),delete a.get("_assignedUniq."+c)[b],a.get("uniquePalette."+c+".0")):void 0}}(this),this.unique.resetSet=function(a){return function(b){return a.get("_assignedUniq")[b]={},a.get("uniquePalette")[b]=a.freshColorPalette().shuffleVals()}}(this),this.unique._prepareSet=function(a){return function(b){return null==a.get("uniquePalette."+b)?a.unique.resetSet(b):void 0}}(this)},_defaultAssigned:"#5895B2",_defaultUnassigned:"#8da3b0",_colorScheme:["#3498DB","#9B59B6","#F2CA27","#34495E","#1ABC9C","#E74C3C","#95A5A6","#ECF0F1","#2ECC71","#5895B2"],_rotating_color_val:Ember.computed(function(){return{}}),_rotating_keys_used:0,_rotating_color:function(a){var b,c;return null!=a?((b=this.get("_rotating_color_val."+a))||(c=this.get("_colorScheme"),b=c[this._rotating_keys_used++%c.length],this.set("_rotating_color_val."+a,b)),b):void 0},_defaultVal:Ember.computed(function(){var a;return(null!=(a=window.colors)?a.defaultSingle:void 0)||this.get("_defaultAssigned")}),_fixedVals:{blog:"#28cfc5",board:"#FB913F",twitter:"#2AA9E0",facebook:"#4D69A2",google:"#DD4C39",youtube:"#E14D42",instagram:"#FFCB33",linkedin:"#1E87BD",male:"#29A0CE",unisex:"#d6dadb",female:"#FC4482",positive:"#74B81D",negative:"#E74C3C",neutral:"#A8CEE0",unknown:"#d6dadb"}})}.call(this),function(){var a={}.hasOwnProperty;this.Visualizer.Scene=Ember.Object.extend({visualizer:null,identifier:null,title:null,description:null,drawWait:100,fullRefreshWait:20,widgets:Ember.computed(function(){return[]}),requestedModuleViews:function(){var a,b,c,d,e,f,g;for(b={},g=this.get("widgets"),d=0,e=g.length;e>d;d++)c=g[d],a=null!=b[f=c.module]?b[f]:b[f]={},a[c.view]=!0;return b}.property("widgets.@each"),clearUnusedViews:function(){var b,c,d,e,f,g;f=this.get("visualizer.modules");for(c in f)if(a.call(f,c)){b=f[c],g=b.get("moduleViews");for(e in g)a.call(g,e)&&(d=g[e],this.get("requestedModuleViews."+c+"."+e)||"function"==typeof d.clear&&d.clear())}return this},runWidgets:function(a){var b,c,d;for(null==a&&(a=this.get("widgets")),c=0,d=a.length;d>c;c++)b=a[c],this._runWidget(b);return this},_runWidget:function(a){var b;return null==a&&(a={}),b="visualizer.modules."+a.module+".moduleViews."+a.view,Visualizer.Utils.waitForRepeatingEvents(function(c){return function(){var d;return null!=(d=c.get(b))?d.run(a.operation,a.params):void 0}}(this),this.get("drawWait"),"Scene Redraw for "+b,this.get("visualizer.timers"))},reload:function(){return Visualizer.Utils.waitForRepeatingEvents(function(a){return function(){return a.clearUnusedViews(),a.runWidgets()}}(this),this.get("fullRefreshWait"),"Full Scene Reload",this.get("visualizer.timers"))}})}.call(this),function(){var a,b;this.Visualizer.World=Ember.Object.extend({loaded:Ember.computed.gt("worldObj.length",0),$:function(a){return null!=a?this.get("worldObj").find(a):this.get("worldObj")},resize:function(){var a,b,c;return a=this.get("worldObj"),a.length?(b=this.get("worldObj").offset(),this.setProperties({width:a.innerWidth(),height:c=a.innerHeight(),top:b.top,left:b.left})):void 0}.observes("worldObj").on("init"),_bindGlobalEvents:function(){return $(window).on("resize",function(a){return function(){return a.resize()}}(this))}.on("init"),_bindWorldEvents:function(){var a;return(a=this.$()).length?a.off("click",".phasedButton").on("click",".phasedButton",b):void 0}.observes("worldObj").on("init"),injectDefaultWorld:function(){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.warn&&console.warn("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version."),this.$().empty().append($(a))}}),b=function(a){return $(this).hasClass("disabledItem")?(a.stopImmediatePropagation(),!1):Ember.run.next(this,function(){return $(this).addExpiringClass("disabledItem",2e3)})},a="
      "}.call(this),function(){Array.prototype.removeInstancesOf=function(a){for(var b;;){if(-1===(b=this.indexOf(a)))break;this.splice(b,1)}return this},Array.prototype.shuffleVals=function(){var a,b,c,d,e,f;for(a=e=0,f=this.length;f>e;a=++e)b=this[a],c=Math.floor(Math.random()*(a+1)),d=b,this[a]=this[c],this[c]=d;return this}}.call(this),function(){var a={}.hasOwnProperty;Ember.Object.reopen({values:function(){var b,c,d;d=[];for(b in this)a.call(this,b)&&(c=this[b],d.push(c));return d}})}.call(this),function(){jQuery.fn.extend({addExpiringClass:function(a,b){return null==a&&(a="disabled"),null==b&&(b=1e3),this.addClass(a),setTimeout(function(b){return function(){return b.removeClass(a)}}(this),b)}})}.call(this),function(){String.prototype.truncateTo=function(a,b){var c;return null==b&&(b="…"),c=b.length,(isNaN(a)||c>=a)&&(a=b.length+1),this.length>a?this.substr(0,a-c)+b:this},String.prototype.advancedIndexOf=function(a,b){var c;return null==b&&(b={}),c=this,b.isCaseInsensitive&&(c=c.toLowerCase(),a=a.toLowerCase()),c.indexOf(a)},String.prototype.includes=function(a,b){return this.advancedIndexOf(a,{isCaseInsensitive:b})>=0},String.prototype.beginsWith=function(a,b){return 0===this.advancedIndexOf(a,{isCaseInsensitive:b})},String.prototype.capitalizeLetter=function(a){var b;return null==a&&(a=0),b=0===a?"":this.slice(0,a),b+this.charAt(a).toUpperCase()+this.slice(a+1)},String.prototype.titleize=function(){return this.toLowerCase().replace(/\b\w/g,function(a){return a.toUpperCase()})},String.prototype.removeInitialUnderscore=function(){return this.replace(/^_/,"")}}.call(this),function(){var a;this.Visualizer.Utils={existsWithValue:function(a){return"undefined"!=typeof a&&null!==a},waitForRepeatingEvents:function(){var a,b;return b={},a=function(a,c,d,e){var f;return null==d&&(d="default timer"),null==e&&(e=b),f=e[d],f&&clearTimeout(f),e[d]=setTimeout(a,c)}}(),minVal:function(a,b){return b>=a?a:b},maxVal:function(a,b){return a>=b?a:b},boundedVal:function(a,b,c){return b>a?b:a>c?c:a},randBetween:function(a,b){return null==a&&(a=0),null==b&&(b=10),Math.random()*(b-a)+a},randIntBetween:function(a,b){return Math.floor(Visualizer.Utils.randBetween(a,b)||4)},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},relativeSizeString:function(a,b){var c;return c=parseInt(a),"string"==typeof a&&a.indexOf("%")>=0?c/100*b:isFinite(c)?c:void 0},intersectionSafe:function(a,b){var c,d,e;for(c=0,d=0,e=[];cb[d]?d++:(e.push(c),c++,d++);return e},intersectionCount:function(a,b){var c,d,e;for(c=0,d=0,e=0;cb[d]?d++:(e++,c++,d++);return e},cloneArray:function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("cloneArray function is deprecated, please use Array.copy()"),a.slice(0)}},window.waitForRepeatingEvents=function(){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Global Namespace for waitForRepeatingEvents function is deprecated, please use Visualizer.Utils.waitForRepeatingEvents"),Visualizer.Utils.waitForRepeatingEvents.apply(window,arguments)},window.existsWithValue=function(){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Global Namespace for existsWithValue function is deprecated, please use Visualizer.Utils.existsWithValue"),Visualizer.Utils.existsWithValue.apply(window,arguments)},Visualizer.Utils.updateKCodePosition=function(a,b){return 38===a?2>b?2>b&&(b+=1):b>2&&(b=1):(40!==a||2!==b&&3!==b)&&(37!==a||4!==b&&6!==b)&&(39!==a||5!==b&&7!==b)?66===a&&8===b?b+=1:b=65===a&&9===b?10:0:b+=1,b},a=function(a,b){return a>8&&(a=Math.floor(10*Math.random()+a-5)),b>8&&(b=Math.floor(10*Math.random()+b-5)),"http://placekitten.com/"+a+"/"+b}}.call(this),function(){this.Visualizer.Module=Ember.ArrayController.extend({visualizer:null,maxLength:100,content:Ember.computed(function(){return Ember.A()}).property(),dataset:Ember.computed.alias("arrangedContent"),moduleViews:Ember.computed(function(){return Ember.Object.create()}).property(),init:function(){return"function"==typeof this.setDefaultViews?this.setDefaultViews():void 0},requestRedraw:function(){var a,b,c;return b=this.get("visualizer.currentScene"),a=this.get("key"),null!=b&&null!=a?b.runWidgets(null!=(c=b.get("widgets"))?c.filterBy("module",a):void 0):void 0},forceLimit:function(a){var b;return null==a&&(a="timestamp"),b=this.get("dataset").sort(function(b,c){return c[a]-b[a]}),this.set("dataset",b.slice(0,this.get("maxLength")))},groupedBy:function(a){var b,c,d,e;return b=a.replace(".","__"),c="__groupedBy_"+b,null==(e=this.get(c))&&(d={},d[c]=function(){return this._groupedBy(a).sort(function(a,b){return b.length-a.length})}.property("dataset.@each."+a),this.reopen(d)),e||this.get(c)},_groupedBy:function(a){var b,c,d,e,f,g;for(b=Ember.Object.create(),g=this.get("dataset"),e=0,f=g.length;f>e;e++)c=g[e],d=Ember.get(c,a),(null!=b[d]?b[d]:b[d]=[]).push(c);return b.values()}})}.call(this),function(){this.Visualizer.ModuleView=Ember.Object.extend({module:null,containerSelector:null,previousSelectors:Ember.computed(function(){return[]}),visualizer:Ember.computed.alias("module.visualizer"),data:Ember.computed.alias("module.dataset"),arrangedContent:Ember.computed.alias("module.arrangedContent"),dimensionsDidChange:!0,init:function(a){return this.set("module",a)},clear:function(){},destroy:function(){return this.clear()},run:function(a,b){return null==b&&(b={}),b.container&&this.updateSelector(b.container),this._presetContainerAttrs(b),"function"==typeof this[a]?this[a](b):void 0},updateSelector:function(a){var b;return a!==(b=this.get("containerSelector"))?(this.clear(),this.get("previousSelectors").push(b),this.set("containerSelector",a)):void 0},$container:function(a){var b;return b=a?" "+a:"",this.get("visualizer.world").$(""+this.get("containerSelector")+b)},hardReset:function(){return this.set("dimensionsDidChange",!0),this.run("clear")}.observes("data"),widgetParamedOutlineCSS:function(a){var b,c,d,e,f;for(null==a&&(a={}),b={},f=["width","height","left","top"],d=0,e=f.length;e>d;d++)c=f[d],null!=a[c]&&(b[c]=""+this.get(c)+"px");return b},width:function(a,b){return this._updateDimension(a,b)}.property(),height:function(a,b){return this._updateDimension(a,b)}.property(),_updateDimension:function(a,b){var c;return null!=b&&(b=Math.floor(b),b!==(c=this.get(a))&&this.set("dimensionsDidChange",!0)),b},_presetContainerAttrs:function(a){var b;return null==a&&(a={}),null!=a.width&&null!=a.height||(b=this.$container(),null==a.width&&this.set("width",b.width()),null!=a.height)?void 0:this.set("height",b.height())}})}.call(this),function(){Visualizer.ModuleView.ResizableMixin=Ember.Mixin.create({run:function(a,b){return null==b&&(b={}),this._updateSize(b),this._super(a,b)},_updateSize:function(a){var b,c,d,e,f;for(null==a&&(a={}),this.get("visualizer.world").resize(),e=[{key:"width"},{key:"height"},{key:"left",req:"width"},{key:"top",req:"height"}],f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(this._tryUpdateValue(b.key,a[b.key],a,b.req));return f},_tryUpdateValue:function(a,b,c,d){var e,f;return null==c&&(c={}),null==d&&(d=a),null!=b&&(null!=c.padding&&(f=Visualizer.Utils.relativeSizeString(c.padding,this.get("visualizer.world."+d))),f=null!=f?f:15,e=Math.floor(Visualizer.Utils.relativeSizeString(b,this.get("visualizer.world."+d))-f),isFinite(e)&&this.get(a)!==e)?(this.set(a,e),!0):!1}})}.call(this); \ No newline at end of file +(function(){var a,b={}.hasOwnProperty;this.Visualizer=a=Ember.Object.extend({world:null,scenes:Ember.computed(function(){return{}}),modules:Ember.computed(function(){return Ember.Object.create()}).property(),associations:Ember.computed(function(){return Ember.Object.create()}).property(),timers:Ember.computed(function(){return{}}),init:function(b){return this.useWorld(b),this.set("color",a.Colorer.create({visualizer:this}))},useWorld:function(b){return this.set("world",a.World.create({worldObj:$(b),visualizer:this}))},addModule:function(a,b,c){var d;return d=a.create({visualizer:this,key:b}),this.set("modules."+b,d),null!=c&&this.set("modules."+b+".content",c),d.requestRedraw()},refresh:function(){var a;return this.get("world.loaded")&&null!=(a=this.get("currentScene"))?a.reload():void 0}.observes("currentScene","world.worldObj","world.loaded","world.width","world.height"),useScenes:function(b){var c,d,e,f;for(null==b&&(b=[]),a.Utils.isArray(b)||("undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Object({})-type input for useScenes is deprecated - please pass an Array instead..."),b=b.visualizer_scenes),f=[],d=0,e=b.length;e>d;d++)c=b[d],c.visualizer=this,f.push(this.set("scenes."+c.identifier,a.Scene.create(c)));return f},setScene:function(a){return this.set("currentScene",this.get("scenes."+a))},destroy:function(){var a,c,d,e;d=this.get("modules"),e=[];for(c in d)b.call(d,c)&&(a=d[c],e.push("function"==typeof a.destroy?a.destroy():void 0));return e}})}).call(this),function(){this.Visualizer.Colorer=Ember.Object.extend({visualizer:null,init:function(){return this.get("_assignedUniq"),this.get("uniquePalette"),this._setUniqueProps()},freshColorPalette:function(){return this.get("_colorScheme").copy()},fixed:function(a){return null==a&&(a=""),null!=a&&(a=""+a.toLowerCase()).length?this.get("_fixedVals."+a)||this._rotating_color(a):this.get("_defaultVal")},uniquePalette:Ember.computed(function(){return{}}),_assignedUniq:Ember.computed(function(){return{}}),unique:function(a,b){return null==a&&(a=""),null==b&&(b="main"),this.get("_assignedUniq."+b+"."+a)},_setUniqueProps:function(){return this.unique.next=function(a){return function(b){return null==b&&(b="main"),a.unique._prepareSet(b),a.get("uniquePalette."+b+".0")}}(this),this.unique.assign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&null==a.unique(b,c)?(d=a.get("uniquePalette."+c).shift()||a.get("_defaultAssigned"),a.set("_assignedUniq."+c+"."+b,d)):void 0}}(this),this.unique.unassign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&(d=a.unique(b,c),null!=d&&d!==a.get("_defaultUnassigned"))?(d!==a.get("_defaultAssigned")&&a.get("uniquePalette."+c).push(d),delete a.get("_assignedUniq."+c)[b],a.get("uniquePalette."+c+".0")):void 0}}(this),this.unique.resetSet=function(a){return function(b){return a.get("_assignedUniq")[b]={},a.get("uniquePalette")[b]=a.freshColorPalette().shuffleVals()}}(this),this.unique._prepareSet=function(a){return function(b){return null==a.get("uniquePalette."+b)?a.unique.resetSet(b):void 0}}(this)},_defaultAssigned:"#5895B2",_defaultUnassigned:"#8da3b0",_colorScheme:["#3498DB","#9B59B6","#F2CA27","#34495E","#1ABC9C","#E74C3C","#95A5A6","#ECF0F1","#2ECC71","#5895B2"],_rotating_color_val:Ember.computed(function(){return{}}),_rotating_keys_used:0,_rotating_color:function(a){var b,c;return null!=a?((b=this.get("_rotating_color_val."+a))||(c=this.get("_colorScheme"),b=c[this._rotating_keys_used++%c.length],this.set("_rotating_color_val."+a,b)),b):void 0},_defaultVal:Ember.computed(function(){var a;return(null!=(a=window.colors)?a.defaultSingle:void 0)||this.get("_defaultAssigned")}),_fixedVals:{blog:"#28cfc5",board:"#FB913F",twitter:"#2AA9E0",facebook:"#4D69A2",google:"#DD4C39",youtube:"#E14D42",instagram:"#FFCB33",linkedin:"#1E87BD",male:"#29A0CE",unisex:"#d6dadb",female:"#FC4482",positive:"#74B81D",negative:"#E74C3C",neutral:"#A8CEE0",unknown:"#d6dadb"}})}.call(this),function(){var a={}.hasOwnProperty;this.Visualizer.Scene=Ember.Object.extend({visualizer:null,identifier:null,title:null,description:null,drawWait:100,fullRefreshWait:20,widgets:Ember.computed(function(){return[]}),requestedModuleViews:function(){var a,b,c,d,e,f,g;for(b={},g=this.get("widgets"),d=0,e=g.length;e>d;d++)c=g[d],a=null!=b[f=c.module]?b[f]:b[f]={},a[c.view]=!0;return b}.property("widgets.@each"),clearUnusedViews:function(){var b,c,d,e,f,g;f=this.get("visualizer.modules");for(c in f)if(a.call(f,c)){b=f[c],g=b.get("moduleViews");for(e in g)a.call(g,e)&&(d=g[e],this.get("requestedModuleViews."+c+"."+e)||"function"==typeof d.clear&&d.clear())}return this},runWidgets:function(a){var b,c,d;for(null==a&&(a=this.get("widgets")),c=0,d=a.length;d>c;c++)b=a[c],this._runWidget(b);return this},_runWidget:function(a){var b;return null==a&&(a={}),b="visualizer.modules."+a.module+".moduleViews."+a.view,Visualizer.Utils.waitForRepeatingEvents(function(c){return function(){var d;return null!=(d=c.get(b))?d.run(a.operation,a.params):void 0}}(this),this.get("drawWait"),"Scene Redraw for "+b,this.get("visualizer.timers"))},reload:function(){return Visualizer.Utils.waitForRepeatingEvents(function(a){return function(){return a.clearUnusedViews(),a.runWidgets()}}(this),this.get("fullRefreshWait"),"Full Scene Reload",this.get("visualizer.timers"))}})}.call(this),function(){var a;this.Visualizer.World=Ember.Object.extend({loaded:Ember.computed.gt("worldObj.length",0),$:function(a){return null!=a?this.get("worldObj").find(a):this.get("worldObj")},resize:function(){var a,b,c;return a=this.get("worldObj"),a.length?(b=this.get("worldObj").offset(),this.setProperties({width:a.innerWidth(),height:c=a.innerHeight(),top:b.top,left:b.left})):void 0}.observes("worldObj").on("init"),_bindGlobalEvents:function(){return $(window).on("resize",function(a){return function(){return a.resize()}}(this))}.on("init"),_bindWorldEvents:function(){var b;return(b=this.$()).length?b.off("click",".phasedButton").on("click",".phasedButton",a):void 0}.observes("worldObj").on("init")}),a=function(a){return $(this).hasClass("disabledItem")?(a.stopImmediatePropagation(),!1):Ember.run.next(this,function(){return $(this).addExpiringClass("disabledItem",2e3)})}}.call(this),function(){Array.prototype.removeInstancesOf=function(a){for(var b;;){if(-1===(b=this.indexOf(a)))break;this.splice(b,1)}return this},Array.prototype.shuffleVals=function(){var a,b,c,d,e,f;for(a=e=0,f=this.length;f>e;a=++e)b=this[a],c=Math.floor(Math.random()*(a+1)),d=b,this[a]=this[c],this[c]=d;return this}}.call(this),function(){var a={}.hasOwnProperty;Ember.Object.reopen({values:function(){var b,c,d;d=[];for(b in this)a.call(this,b)&&(c=this[b],d.push(c));return d}})}.call(this),function(){jQuery.fn.extend({addExpiringClass:function(a,b){return null==a&&(a="disabled"),null==b&&(b=1e3),this.addClass(a),setTimeout(function(b){return function(){return b.removeClass(a)}}(this),b)}})}.call(this),function(){String.prototype.truncateTo=function(a,b){var c;return null==b&&(b="…"),c=b.length,(isNaN(a)||c>=a)&&(a=b.length+1),this.length>a?this.substr(0,a-c)+b:this},String.prototype.advancedIndexOf=function(a,b){var c;return null==b&&(b={}),c=this,b.isCaseInsensitive&&(c=c.toLowerCase(),a=a.toLowerCase()),c.indexOf(a)},String.prototype.includes=function(a,b){return this.advancedIndexOf(a,{isCaseInsensitive:b})>=0},String.prototype.beginsWith=function(a,b){return 0===this.advancedIndexOf(a,{isCaseInsensitive:b})},String.prototype.capitalizeLetter=function(a){var b;return null==a&&(a=0),b=0===a?"":this.slice(0,a),b+this.charAt(a).toUpperCase()+this.slice(a+1)},String.prototype.titleize=function(){return this.toLowerCase().replace(/\b\w/g,function(a){return a.toUpperCase()})},String.prototype.removeInitialUnderscore=function(){return this.replace(/^_/,"")}}.call(this),function(){var a;this.Visualizer.Utils={existsWithValue:function(a){return"undefined"!=typeof a&&null!==a},waitForRepeatingEvents:function(){var a,b;return b={},a=function(a,c,d,e){var f;return null==d&&(d="default timer"),null==e&&(e=b),f=e[d],f&&clearTimeout(f),e[d]=setTimeout(a,c)}}(),minVal:function(a,b){return b>=a?a:b},maxVal:function(a,b){return a>=b?a:b},boundedVal:function(a,b,c){return b>a?b:a>c?c:a},randBetween:function(a,b){return null==a&&(a=0),null==b&&(b=10),Math.random()*(b-a)+a},randIntBetween:function(a,b){return Math.floor(Visualizer.Utils.randBetween(a,b)||4)},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},relativeSizeString:function(a,b){var c;return c=parseInt(a),"string"==typeof a&&a.indexOf("%")>=0?c/100*b:isFinite(c)?c:void 0},intersectionSafe:function(a,b){var c,d,e;for(c=0,d=0,e=[];cb[d]?d++:(e.push(c),c++,d++);return e},intersectionCount:function(a,b){var c,d,e;for(c=0,d=0,e=0;cb[d]?d++:(e++,c++,d++);return e},cloneArray:function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("cloneArray function is deprecated, please use Array.copy()"),a.slice(0)}},Visualizer.Utils.updateKCodePosition=function(a,b){return 38===a?2>b?2>b&&(b+=1):b>2&&(b=1):(40!==a||2!==b&&3!==b)&&(37!==a||4!==b&&6!==b)&&(39!==a||5!==b&&7!==b)?66===a&&8===b?b+=1:b=65===a&&9===b?10:0:b+=1,b},a=function(a,b){return a>8&&(a=Math.floor(10*Math.random()+a-5)),b>8&&(b=Math.floor(10*Math.random()+b-5)),"http://placekitten.com/"+a+"/"+b}}.call(this),function(){this.Visualizer.Module=Ember.ArrayController.extend({visualizer:null,maxLength:100,content:Ember.computed(function(){return Ember.A()}).property(),dataset:Ember.computed.alias("arrangedContent"),moduleViews:Ember.computed(function(){return Ember.Object.create()}).property(),init:function(){return"function"==typeof this.setDefaultViews?this.setDefaultViews():void 0},requestRedraw:function(){var a,b,c;return b=this.get("visualizer.currentScene"),a=this.get("key"),null!=b&&null!=a?b.runWidgets(null!=(c=b.get("widgets"))?c.filterBy("module",a):void 0):void 0},forceLimit:function(a){var b;return null==a&&(a="timestamp"),b=this.get("dataset").sort(function(b,c){return c[a]-b[a]}),this.set("dataset",b.slice(0,this.get("maxLength")))},groupedBy:function(a){var b,c,d,e;return b=a.replace(".","__"),c="__groupedBy_"+b,null==(e=this.get(c))&&(d={},d[c]=function(){return this._groupedBy(a).sort(function(a,b){return b.length-a.length})}.property("dataset.@each."+a),this.reopen(d)),e||this.get(c)},_groupedBy:function(a){var b,c,d,e,f,g;for(b=Ember.Object.create(),g=this.get("dataset"),e=0,f=g.length;f>e;e++)c=g[e],d=Ember.get(c,a),(null!=b[d]?b[d]:b[d]=[]).push(c);return b.values()}})}.call(this),function(){this.Visualizer.ModuleView=Ember.Object.extend({module:null,containerSelector:null,previousSelectors:Ember.computed(function(){return[]}),visualizer:Ember.computed.alias("module.visualizer"),data:Ember.computed.alias("module.dataset"),arrangedContent:Ember.computed.alias("module.arrangedContent"),dimensionsDidChange:!0,init:function(a){return this.set("module",a)},clear:function(){},destroy:function(){return this.clear()},run:function(a,b){return null==b&&(b={}),b.container&&this.updateSelector(b.container),this._presetContainerAttrs(b),"function"==typeof this[a]?this[a](b):void 0},updateSelector:function(a){var b;return a!==(b=this.get("containerSelector"))?(this.clear(),this.get("previousSelectors").push(b),this.set("containerSelector",a)):void 0},$container:function(a){var b;return b=a?" "+a:"",this.get("visualizer.world").$(""+this.get("containerSelector")+b)},hardReset:function(){return this.set("dimensionsDidChange",!0),this.run("clear")}.observes("data"),widgetParamedOutlineCSS:function(a){var b,c,d,e,f;for(null==a&&(a={}),b={},f=["width","height","left","top"],d=0,e=f.length;e>d;d++)c=f[d],null!=a[c]&&(b[c]=""+this.get(c)+"px");return b},width:function(a,b){return this._updateDimension(a,b)}.property(),height:function(a,b){return this._updateDimension(a,b)}.property(),_updateDimension:function(a,b){var c;return null!=b&&(b=Math.floor(b),b!==(c=this.get(a))&&this.set("dimensionsDidChange",!0)),b},_presetContainerAttrs:function(a){var b;return null==a&&(a={}),null!=a.width&&null!=a.height||(b=this.$container(),null==a.width&&this.set("width",b.width()),null!=a.height)?void 0:this.set("height",b.height())}})}.call(this),function(){Visualizer.ModuleView.ResizableMixin=Ember.Mixin.create({run:function(a,b){return null==b&&(b={}),this._updateSize(b),this._super(a,b)},_updateSize:function(a){var b,c,d,e,f;for(null==a&&(a={}),this.get("visualizer.world").resize(),e=[{key:"width"},{key:"height"},{key:"left",req:"width"},{key:"top",req:"height"}],f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(this._tryUpdateValue(b.key,a[b.key],a,b.req));return f},_tryUpdateValue:function(a,b,c,d){var e,f;return null==c&&(c={}),null==d&&(d=a),null!=b&&(null!=c.padding&&(f=Visualizer.Utils.relativeSizeString(c.padding,this.get("visualizer.world."+d))),f=null!=f?f:15,e=Math.floor(Visualizer.Utils.relativeSizeString(b,this.get("visualizer.world."+d))-f),isFinite(e)&&this.get(a)!==e)?(this.set(a,e),!0):!1}})}.call(this); \ No newline at end of file diff --git a/build/js/j-visualizer.js b/build/js/j-visualizer.js index a66c63e..130c55e 100644 --- a/build/js/j-visualizer.js +++ b/build/js/j-visualizer.js @@ -110,14 +110,6 @@ })); }, - /** - * Alias for Visualizer.World method: injectDefaultWorld - * @deprecated Use (visualizer).get('world').injectDefaultWorld() - */ - injectWorld: function() { - return this.get('world').injectDefaultWorld(); - }, - /** * addModule creates a Visualizer.Module object specified by the moduleClass parameter, * using a provided key (to allow differentiation and access). If (optional) content @@ -783,7 +775,7 @@ */ (function() { - var defaultWorldTemplate, _handlePhasedButtonClick; + var _handlePhasedButtonClick; this.Visualizer.World = Ember.Object.extend({ @@ -873,25 +865,7 @@ if (($world = this.$()).length) { return $world.off("click", ".phasedButton").on("click", ".phasedButton", _handlePhasedButtonClick); } - }).observes('worldObj').on('init'), - - /** - * injectDefaultWorld clears out the Visualizer World's contents, injects the basic - * visualizer skeleton - * - * @deprecated @todo Deprecate this. ModuleViews should take care of this on a per-App basis... - * - * @method injectDefaultWorld - * @return {void} - */ - injectDefaultWorld: function() { - if (typeof console !== "undefined" && console !== null) { - if (typeof console.warn === "function") { - console.warn("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version."); - } - } - return this.$().empty().append($(defaultWorldTemplate)); - } + }).observes('worldObj').on('init') }); @@ -916,8 +890,6 @@ }); }; - defaultWorldTemplate = "
      "; - }).call(this); @@ -1436,29 +1408,6 @@ }; - /* - * Previously Globally defined functions... - */ - - window.waitForRepeatingEvents = function() { - if (typeof console !== "undefined" && console !== null) { - if (typeof console.log === "function") { - console.log("Global Namespace for waitForRepeatingEvents function is deprecated, please use Visualizer.Utils.waitForRepeatingEvents"); - } - } - return Visualizer.Utils.waitForRepeatingEvents.apply(window, arguments); - }; - - window.existsWithValue = function() { - if (typeof console !== "undefined" && console !== null) { - if (typeof console.log === "function") { - console.log("Global Namespace for existsWithValue function is deprecated, please use Visualizer.Utils.existsWithValue"); - } - } - return Visualizer.Utils.existsWithValue.apply(window, arguments); - }; - - /* * FUN! */ diff --git a/documentation/classes/NativeClass.Array.html b/documentation/classes/NativeClass.Array.html index 682cf93..d7ad952 100644 --- a/documentation/classes/NativeClass.Array.html +++ b/documentation/classes/NativeClass.Array.html @@ -228,7 +228,7 @@

      removeInstancesOf

      - build/js/j-visualizer.js:924 + build/js/j-visualizer.js:896

      @@ -325,7 +325,7 @@

      shuffleVals

      - build/js/j-visualizer.js:948 + build/js/j-visualizer.js:920

      @@ -400,7 +400,7 @@

      values

      - build/js/j-visualizer.js:978 + build/js/j-visualizer.js:950

      diff --git a/documentation/classes/NativeClass.String.html b/documentation/classes/NativeClass.String.html index 1340603..9fed922 100644 --- a/documentation/classes/NativeClass.String.html +++ b/documentation/classes/NativeClass.String.html @@ -262,7 +262,7 @@

      advancedIndexOf

      - build/js/j-visualizer.js:1062 + build/js/j-visualizer.js:1034

      @@ -394,7 +394,7 @@

      beginsWith

      - build/js/j-visualizer.js:1109 + build/js/j-visualizer.js:1081

      @@ -520,7 +520,7 @@

      capitalizeLetter

      - build/js/j-visualizer.js:1129 + build/js/j-visualizer.js:1101

      @@ -636,7 +636,7 @@

      includes

      - build/js/j-visualizer.js:1089 + build/js/j-visualizer.js:1061

      @@ -752,7 +752,7 @@

      removeInitialUnderscore

      - build/js/j-visualizer.js:1167 + build/js/j-visualizer.js:1139

      @@ -825,7 +825,7 @@

      titleize

      - build/js/j-visualizer.js:1151 + build/js/j-visualizer.js:1123

      @@ -914,7 +914,7 @@

      truncateTo

      - build/js/j-visualizer.js:1033 + build/js/j-visualizer.js:1005

      diff --git a/documentation/classes/Visualizer.Colorer.html b/documentation/classes/Visualizer.Colorer.html index 31aff18..1128780 100644 --- a/documentation/classes/Visualizer.Colorer.html +++ b/documentation/classes/Visualizer.Colorer.html @@ -114,7 +114,7 @@

      Visualizer.Colorer Class

      @@ -346,7 +346,7 @@

      _rotating_color

      - build/js/j-visualizer.js:510 + build/js/j-visualizer.js:502

      @@ -448,7 +448,7 @@

      _setUniqueProps

      - build/js/j-visualizer.js:356 + build/js/j-visualizer.js:348

      @@ -539,7 +539,7 @@

      fixed

      - build/js/j-visualizer.js:281 + build/js/j-visualizer.js:273

      @@ -639,7 +639,7 @@

      freshColorPalette

      - build/js/j-visualizer.js:269 + build/js/j-visualizer.js:261

      @@ -729,7 +729,7 @@

      unique

      - build/js/j-visualizer.js:330 + build/js/j-visualizer.js:322

      @@ -857,7 +857,7 @@

      unique._prepareSet

      - build/js/j-visualizer.js:463 + build/js/j-visualizer.js:455

      @@ -968,7 +968,7 @@

      unique.assign

      - build/js/j-visualizer.js:397 + build/js/j-visualizer.js:389

      @@ -1090,7 +1090,7 @@

      unique.next

      - build/js/j-visualizer.js:379 + build/js/j-visualizer.js:371

      @@ -1199,7 +1199,7 @@

      unique.resetSet

      - build/js/j-visualizer.js:448 + build/js/j-visualizer.js:440

      @@ -1311,7 +1311,7 @@

      unique.unassign

      - build/js/j-visualizer.js:419 + build/js/j-visualizer.js:411

      @@ -1419,7 +1419,7 @@

      _colorScheme

      - build/js/j-visualizer.js:498 + build/js/j-visualizer.js:490

      @@ -1464,7 +1464,7 @@

      _defaultAssigned

      - build/js/j-visualizer.js:479 + build/js/j-visualizer.js:471

      @@ -1511,7 +1511,7 @@

      _defaultUnassigned

      - build/js/j-visualizer.js:489 + build/js/j-visualizer.js:481

      @@ -1557,7 +1557,7 @@

      _fixedVals

      - build/js/j-visualizer.js:536 + build/js/j-visualizer.js:528

      @@ -1603,7 +1603,7 @@

      uniquePalette

      - build/js/j-visualizer.js:303 + build/js/j-visualizer.js:295

      @@ -1650,7 +1650,7 @@

      uniquePalette

      - build/js/j-visualizer.js:316 + build/js/j-visualizer.js:308

      @@ -1698,7 +1698,7 @@

      visualizer

      - build/js/j-visualizer.js:248 + build/js/j-visualizer.js:240

      diff --git a/documentation/classes/Visualizer.Module.html b/documentation/classes/Visualizer.Module.html index 5a8063c..f6013e2 100644 --- a/documentation/classes/Visualizer.Module.html +++ b/documentation/classes/Visualizer.Module.html @@ -114,7 +114,7 @@

      Visualizer.Module Class

      @@ -294,7 +294,7 @@

      _groupedBy

      - build/js/j-visualizer.js:1676 + build/js/j-visualizer.js:1625

      @@ -405,7 +405,7 @@

      forceLimit

      - build/js/j-visualizer.js:1622 + build/js/j-visualizer.js:1571

      @@ -513,7 +513,7 @@

      groupedBy

      - build/js/j-visualizer.js:1644 + build/js/j-visualizer.js:1593

      @@ -617,7 +617,7 @@

      requestRedraw

      - build/js/j-visualizer.js:1606 + build/js/j-visualizer.js:1555

      @@ -684,7 +684,7 @@

      content

      - build/js/j-visualizer.js:1542 + build/js/j-visualizer.js:1491

      @@ -735,7 +735,7 @@

      dataset

      - build/js/j-visualizer.js:1560 + build/js/j-visualizer.js:1509

      @@ -784,7 +784,7 @@

      maxLength

      - build/js/j-visualizer.js:1530 + build/js/j-visualizer.js:1479

      @@ -832,7 +832,7 @@

      moduleViews

      - build/js/j-visualizer.js:1575 + build/js/j-visualizer.js:1524

      @@ -880,7 +880,7 @@

      visualizer

      - build/js/j-visualizer.js:1521 + build/js/j-visualizer.js:1470

      diff --git a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html index 4ed20bd..b0df820 100644 --- a/documentation/classes/Visualizer.ModuleView.ResizableMixin.html +++ b/documentation/classes/Visualizer.ModuleView.ResizableMixin.html @@ -114,7 +114,7 @@

      Visualizer.ModuleView.ResizableMixin Class

      @@ -261,7 +261,7 @@

      _tryUpdateValue

      - build/js/j-visualizer.js:2119 + build/js/j-visualizer.js:2068

      @@ -427,7 +427,7 @@

      _updateSize

      - build/js/j-visualizer.js:2082 + build/js/j-visualizer.js:2031

      @@ -541,7 +541,7 @@

      run

      - build/js/j-visualizer.js:2063 + build/js/j-visualizer.js:2012

      diff --git a/documentation/classes/Visualizer.ModuleView.html b/documentation/classes/Visualizer.ModuleView.html index d473d07..1bc35ef 100644 --- a/documentation/classes/Visualizer.ModuleView.html +++ b/documentation/classes/Visualizer.ModuleView.html @@ -114,7 +114,7 @@

      Visualizer.ModuleView Class

      @@ -356,7 +356,7 @@

      $container

      - build/js/j-visualizer.js:1896 + build/js/j-visualizer.js:1845

      @@ -465,7 +465,7 @@

      _presetContainerAttrs

      - build/js/j-visualizer.js:2014 + build/js/j-visualizer.js:1963

      @@ -584,7 +584,7 @@

      _updateDimension

      - build/js/j-visualizer.js:1985 + build/js/j-visualizer.js:1934

      @@ -705,7 +705,7 @@

      clear

      - build/js/j-visualizer.js:1818 + build/js/j-visualizer.js:1767

      @@ -784,7 +784,7 @@

      destroy

      - build/js/j-visualizer.js:1837 + build/js/j-visualizer.js:1786

      @@ -859,7 +859,7 @@

      hardReset

      - build/js/j-visualizer.js:1913 + build/js/j-visualizer.js:1862

      @@ -950,7 +950,7 @@

      height

      - build/js/j-visualizer.js:1971 + build/js/j-visualizer.js:1920

      @@ -1081,7 +1081,7 @@

      run

      - build/js/j-visualizer.js:1853 + build/js/j-visualizer.js:1802

      @@ -1208,7 +1208,7 @@

      updateSelector

      - build/js/j-visualizer.js:1878 + build/js/j-visualizer.js:1827

      @@ -1315,7 +1315,7 @@

      widgetParamedOutlineCSS

      - build/js/j-visualizer.js:1927 + build/js/j-visualizer.js:1876

      @@ -1436,7 +1436,7 @@

      width

      - build/js/j-visualizer.js:1957 + build/js/j-visualizer.js:1906

      @@ -1546,7 +1546,7 @@

      arrangedContent

      - build/js/j-visualizer.js:1777 + build/js/j-visualizer.js:1726

      @@ -1595,7 +1595,7 @@

      containerSelector

      - build/js/j-visualizer.js:1728 + build/js/j-visualizer.js:1677

      @@ -1647,7 +1647,7 @@

      data

      - build/js/j-visualizer.js:1768 + build/js/j-visualizer.js:1717

      @@ -1692,7 +1692,7 @@

      dimensionsDidChange

      - build/js/j-visualizer.js:1791 + build/js/j-visualizer.js:1740

      @@ -1741,7 +1741,7 @@

      module

      - build/js/j-visualizer.js:1719 + build/js/j-visualizer.js:1668

      @@ -1786,7 +1786,7 @@

      previousSelectors

      - build/js/j-visualizer.js:1746 + build/js/j-visualizer.js:1695

      @@ -1833,7 +1833,7 @@

      visualizer

      - build/js/j-visualizer.js:1759 + build/js/j-visualizer.js:1708

      diff --git a/documentation/classes/Visualizer.Scene.html b/documentation/classes/Visualizer.Scene.html index 7dabe94..2a065b3 100644 --- a/documentation/classes/Visualizer.Scene.html +++ b/documentation/classes/Visualizer.Scene.html @@ -114,7 +114,7 @@

      Visualizer.Scene Class

      @@ -305,7 +305,7 @@

      _runWidget

      - build/js/j-visualizer.js:730 + build/js/j-visualizer.js:722

      @@ -376,7 +376,7 @@

      clearUnusedViews

      - build/js/j-visualizer.js:680 + build/js/j-visualizer.js:672

      @@ -437,7 +437,7 @@

      reload

      - build/js/j-visualizer.js:753 + build/js/j-visualizer.js:745

      @@ -509,7 +509,7 @@

      runWidgets

      - build/js/j-visualizer.js:708 + build/js/j-visualizer.js:700

      @@ -566,7 +566,7 @@

      description

      - build/js/j-visualizer.js:611 + build/js/j-visualizer.js:603

      @@ -612,7 +612,7 @@

      drawWait

      - build/js/j-visualizer.js:621 + build/js/j-visualizer.js:613

      @@ -661,7 +661,7 @@

      fullRefreshWait

      - build/js/j-visualizer.js:633 + build/js/j-visualizer.js:625

      @@ -709,7 +709,7 @@

      identifier

      - build/js/j-visualizer.js:592 + build/js/j-visualizer.js:584

      @@ -754,7 +754,7 @@

      requestedModuleViews

      - build/js/j-visualizer.js:657 + build/js/j-visualizer.js:649

      @@ -803,7 +803,7 @@

      title

      - build/js/j-visualizer.js:601 + build/js/j-visualizer.js:593

      @@ -849,7 +849,7 @@

      visualizer

      - build/js/j-visualizer.js:583 + build/js/j-visualizer.js:575

      @@ -894,7 +894,7 @@

      widgets

      - build/js/j-visualizer.js:644 + build/js/j-visualizer.js:636

      diff --git a/documentation/classes/Visualizer.Utils.html b/documentation/classes/Visualizer.Utils.html index 4db6fcb..30989d1 100644 --- a/documentation/classes/Visualizer.Utils.html +++ b/documentation/classes/Visualizer.Utils.html @@ -110,7 +110,7 @@

      Visualizer.Utils Class

      @@ -311,7 +311,7 @@

      boundedVal

      - build/js/j-visualizer.js:1273 + build/js/j-visualizer.js:1245

      @@ -454,7 +454,7 @@

      cloneArray

      - build/js/j-visualizer.js:1419 + build/js/j-visualizer.js:1391

      @@ -563,7 +563,7 @@

      existsWithValue

      - build/js/j-visualizer.js:1196 + build/js/j-visualizer.js:1168

      @@ -676,7 +676,7 @@

      intersectionCount

      - build/js/j-visualizer.js:1388 + build/js/j-visualizer.js:1360

      @@ -811,7 +811,7 @@

      intersectionSafe

      - build/js/j-visualizer.js:1355 + build/js/j-visualizer.js:1327

      @@ -939,7 +939,7 @@

      isArray

      - build/js/j-visualizer.js:1324 + build/js/j-visualizer.js:1296

      @@ -1052,7 +1052,7 @@

      maxVal

      - build/js/j-visualizer.js:1257 + build/js/j-visualizer.js:1229

      @@ -1181,7 +1181,7 @@

      minVal

      - build/js/j-visualizer.js:1241 + build/js/j-visualizer.js:1213

      @@ -1310,7 +1310,7 @@

      randBetween

      - build/js/j-visualizer.js:1294 + build/js/j-visualizer.js:1266

      @@ -1441,7 +1441,7 @@

      randIntBetween

      - build/js/j-visualizer.js:1312 + build/js/j-visualizer.js:1284

      @@ -1570,7 +1570,7 @@

      relativeSizeString

      - build/js/j-visualizer.js:1335 + build/js/j-visualizer.js:1307

      @@ -1713,7 +1713,7 @@

      waitForRepeatingEvents

      - build/js/j-visualizer.js:1207 + build/js/j-visualizer.js:1179

      diff --git a/documentation/classes/Visualizer.World.html b/documentation/classes/Visualizer.World.html index d908fa0..b9a87fe 100644 --- a/documentation/classes/Visualizer.World.html +++ b/documentation/classes/Visualizer.World.html @@ -114,7 +114,7 @@

      Visualizer.World Class

      @@ -183,15 +183,6 @@

      Methods

      -
    • - -
    • - injectDefaultWorld - - - - deprecated -
    • @@ -278,7 +269,7 @@

      $

      - build/js/j-visualizer.js:801 + build/js/j-visualizer.js:793

      @@ -378,7 +369,7 @@

      _bindGlobalEvents

      - build/js/j-visualizer.js:841 + build/js/j-visualizer.js:833

      @@ -454,7 +445,7 @@

      _bindWorldEvents

      - build/js/j-visualizer.js:860 + build/js/j-visualizer.js:852

      @@ -530,7 +521,7 @@

      _handlePhasedButtonClick

      - build/js/j-visualizer.js:898 + build/js/j-visualizer.js:872

      @@ -551,82 +542,6 @@

      _handlePhasedButtonClick

      -
      -

      Returns:

      - -
      - - - Void: - - -
      -
      - - - - - - -
      -

      injectDefaultWorld

      - - - () - - - - - Void - - - - - deprecated - - - - - - - - - - - - -
      - - - -

      - - Defined in - - - - - build/js/j-visualizer.js:878 - -

      - - - -

      Deprecated: @todo Deprecate this. ModuleViews should take care of this on a per-App basis...

      - - - -
      - -
      -

      injectDefaultWorld clears out the Visualizer World's contents, injects the basic -visualizer skeleton

      - -
      - - - -

      Returns:

      @@ -680,7 +595,7 @@

      resize

      - build/js/j-visualizer.js:818 + build/js/j-visualizer.js:810

      @@ -748,7 +663,7 @@

      loaded

      - build/js/j-visualizer.js:790 + build/js/j-visualizer.js:782

      diff --git a/documentation/classes/Visualizer.html b/documentation/classes/Visualizer.html index 8bfbc07..5dc3dc2 100644 --- a/documentation/classes/Visualizer.html +++ b/documentation/classes/Visualizer.html @@ -318,7 +318,7 @@

      addModule

      - build/js/j-visualizer.js:121 + build/js/j-visualizer.js:113

      @@ -449,7 +449,7 @@

      destroy

      - build/js/j-visualizer.js:212 + build/js/j-visualizer.js:204

      @@ -520,7 +520,7 @@

      refresh

      - build/js/j-visualizer.js:147 + build/js/j-visualizer.js:139

      @@ -607,7 +607,7 @@

      setScene

      - build/js/j-visualizer.js:200 + build/js/j-visualizer.js:192

      @@ -713,7 +713,7 @@

      useScenes

      - build/js/j-visualizer.js:169 + build/js/j-visualizer.js:161

      diff --git a/documentation/classes/jQuery.fn.html b/documentation/classes/jQuery.fn.html index e2de852..11bc854 100644 --- a/documentation/classes/jQuery.fn.html +++ b/documentation/classes/jQuery.fn.html @@ -220,7 +220,7 @@

      addExpiringClass

      - build/js/j-visualizer.js:1000 + build/js/j-visualizer.js:972

      diff --git a/documentation/data.json b/documentation/data.json index 5f52f6c..6d580c6 100644 --- a/documentation/data.json +++ b/documentation/data.json @@ -59,7 +59,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 234, + "line": 226, "description": "Visualizer Colorer\nAn Object that manages the many colors of a visualization.", "todo": [ "refactor this file", @@ -78,7 +78,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 566, + "line": 558, "description": "Visualizer Scene\nRepresents the Object used to manage data (Modules), and the way the data's viewed.\n\nThe visualization of data is a combined effort of all components contained in this project,\naccessed through this Object.", "extends": "Ember.Object" }, @@ -92,7 +92,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 776, + "line": 768, "description": "Visualizer World\nRepresents an Object used to manage an overview viewport for visualizations.", "extends": "Ember.Object" }, @@ -136,7 +136,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1183, + "line": 1155, "description": "Visualizer Utils\nA collection of common utility functions used in the Visualizer." }, "Visualizer.Module": { @@ -149,7 +149,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1504, + "line": 1453, "description": "Visualizer Module\nA Visualizer Module is a collection of data used for Visualization.\nIt keeps access slightly standardized and offers several helpers to\nsimplify data management.\n\nEach Module also has a collection of relevant ModuleViews - Objects that\ndefine and take care of how a given Module's data can be displayed.", "extends": "Ember.ArrayController" }, @@ -163,7 +163,7 @@ "extension_for": [], "namespace": "Visualizer", "file": "build/js/j-visualizer.js", - "line": 1704, + "line": 1653, "description": "Visualizer ModuleView\nModule Views encapsulate the functionality for drawing,\ncoloring, and handling events on visualizations of the data\nprovided by a Module. These are the \"visual\" side of\ndata visualizations.", "extends": "Ember.Object" }, @@ -179,7 +179,7 @@ ], "namespace": "Visualizer.ModuleView", "file": "build/js/j-visualizer.js", - "line": 2047, + "line": 1996, "description": "ResizableMixin\nA helper mixin for ModuleViews which can have their size set manually.\nThis simplifies specifying size, padding, and position of a ModuleView\nviewport container, and allows values to be set either relatively\n(as a percentage of the Visualizer's World), or explicitly (e.g. \"50px\" or 50)", "extends": "Ember.Mixin" } @@ -264,14 +264,6 @@ { "file": "build/js/j-visualizer.js", "line": 113, - "description": "Alias for Visualizer.World method: injectDefaultWorld", - "deprecated": true, - "deprecationMessage": "Use (visualizer).get('world').injectDefaultWorld()", - "class": "Visualizer" - }, - { - "file": "build/js/j-visualizer.js", - "line": 121, "description": "addModule creates a Visualizer.Module object specified by the moduleClass parameter,\nusing a provided key (to allow differentiation and access). If (optional) content\nparameter is provided, it will be set as the module's content.\n\nAfter the module's creation, the Visualizer object is refreshed.", "itemtype": "method", "name": "addModule", @@ -301,7 +293,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 147, + "line": 139, "description": "refresh sends a request to the current scene to update the visualization\nbased on all current dimensions.\n\nThe scene will not be drawn unless the Visualizer's World is loaded (has a viewport).\n\nrefresh observes the world's state, and the current scene - it should automatically\nbe triggered when any of these things change to ensure an up-to-date Visualization.\n\nNote: because Ember Observers currently only watch Array collections (@each), not Object-maps,\nThis will (sadly) not currently watch 'modules.@each.dataset'...", "itemtype": "method", "name": "refresh", @@ -313,7 +305,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 169, + "line": 161, "description": "useScenes updates the Visualizer's scenes collection with the inputScenes parameter.\nFor each item in inputScenes , a Visualizer.Scene object is created, with a\nreference to this instance of Visualizer as its visualizer parameter.", "itemtype": "method", "name": "useScenes", @@ -332,7 +324,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 200, + "line": 192, "description": "setScene updates the Visualizer's currentScene property to reference the\nscene relevant to the method's _identifier parameter.", "itemtype": "method", "name": "setScene", @@ -351,7 +343,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 212, + "line": 204, "description": "destroy cleans up the Visualizer (asking each Module to remove its Views, etc.)", "itemtype": "method", "name": "destroy", @@ -363,7 +355,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 248, + "line": 240, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -374,7 +366,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 257, + "line": 249, "description": "init is called upon creation of a Visualizer Colorer Object.\nIt is responsible for the initial processing and setup of the Object.", "is_constructor": 1, "class": "Visualizer.Colorer", @@ -382,7 +374,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 269, + "line": 261, "description": "freshColorPalette creates a new copy of\nthe main color scheme and returns it.", "itemtype": "method", "name": "freshColorPalette", @@ -395,7 +387,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 281, + "line": 273, "description": "fixed accepts a keyword, and attempts to use the keyword\nto find a relevant color (e.g. \"positive\" may be \"green\").\n\nIf a valid keyword is passed and a relevant color isn't found,\na color is assigned from the rotating set.", "itemtype": "method", "name": "fixed", @@ -415,7 +407,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 303, + "line": 295, "description": "uniquePalette is a collection of sets of remaining\ncolors. Often it will only have a main set, but some\napplications may have more complex coloring needs.", "itemtype": "property", "name": "uniquePalette", @@ -426,7 +418,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 316, + "line": 308, "description": "_assignedUniq is a collection of sets of used colors\n(accessed by key).\nOften it will only have a main set, but some\napplications may have more complex coloring needs.", "itemtype": "property", "name": "uniquePalette", @@ -437,7 +429,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 330, + "line": 322, "description": "unique is a function used to get a unique color for a\ngiven key within a given set (set defaults to \"main\").\n\nThis function has helper properties to handle assigning\nand unassigning colors, determining what the next color\nwill be, and so on.", "todo": [ "consider refactoring / making an Object instead of Function\n(Sorry for the currently complex code)" @@ -467,7 +459,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 356, + "line": 348, "description": "_setUniqueProps sets up the helper sub-functions on the `unique` function.\n\nThis is complex, but allows the following syntax style:\n\n```javascript\n colorer.unique(\"Dylan\") => undefined\n colorer.unique.next() => \"green\"\n\n colorer.unique.assign(\"Dylan\") => undefined\n colorer.unique(\"Dylan\") => \"green\"\n colorer.unique.next() => \"purple\"\n\n colorer.unique.unassign(\"Dylan\") => undefined\n colorer.unique(\"Dylan\") => undefined\n```", "itemtype": "method", "name": "_setUniqueProps", @@ -482,7 +474,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 379, + "line": 371, "description": "unique.next returns the next available color which can be\nassigned to a key.", "itemtype": "method", "name": "unique.next", @@ -504,7 +496,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 397, + "line": 389, "description": "unique.assign attempts to assign a color to a key within a color set.", "itemtype": "method", "name": "unique.assign", @@ -531,7 +523,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 419, + "line": 411, "description": "unique.unassign attempts to unassign a color to a key within a color set.\nThe color is returned to the palette so that it may be reused later.", "itemtype": "method", "name": "unique.unassign", @@ -558,7 +550,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 448, + "line": 440, "description": "unique.resetSet removes colors from all keys within the given set,\nand also replenishes the palette.", "itemtype": "method", "name": "unique.resetSet", @@ -578,7 +570,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 463, + "line": 455, "description": "unique._prepareSet creates and prepares a color set if it doesn't yet exist.", "itemtype": "method", "name": "unique._prepareSet", @@ -598,7 +590,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 479, + "line": 471, "description": "_defaultAssigned is the default color to use for highlighting an item\n(when no other colors in the scheme apply - such as when you\nwish to have unique colors per-key but have no more colors available)", "itemtype": "property", "name": "_defaultAssigned", @@ -608,7 +600,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 489, + "line": 481, "description": "_defaultUnassigned is the default color to use for\nnon-highlighted, but still colored, items.", "itemtype": "property", "name": "_defaultUnassigned", @@ -618,7 +610,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 498, + "line": 490, "description": "_colorScheme is a collection of colors used in the visualization.", "itemtype": "property", "name": "_colorScheme", @@ -628,7 +620,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 510, + "line": 502, "description": "_rotating_color returns an assigned color for a given key\nif available, otherwise assigns a color from the _colorScheme\n(unlike unique(), if all colors are used up, it\nstarts from the first color again.)", "itemtype": "method", "name": "_rotating_color", @@ -648,7 +640,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 536, + "line": 528, "description": "_fixedVals is a collection of key => color pairs for\ncommonly used keys", "itemtype": "property", "name": "_fixedVals", @@ -659,7 +651,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 583, + "line": 575, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -670,7 +662,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 592, + "line": 584, "description": "identifier is a string identifier uniquie to this instance of a Scene", "itemtype": "property", "name": "identifier", @@ -681,7 +673,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 601, + "line": 593, "description": "title is simply a title for the scene, which some\nVisualizer applications may find useful for guiding users.", "itemtype": "property", "name": "title", @@ -692,7 +684,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 611, + "line": 603, "description": "description is simply a description of the scene, which some\nVisualizer applications may find useful for describing a scene to users.", "itemtype": "property", "name": "description", @@ -703,7 +695,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 621, + "line": 613, "description": "drawWait is the debounce time waited before running a single widget's update.\nIf a widget's reload is requested many times in rapid succession it will wait\nuntil drawWait milliseconds after the last call before executing the reload.", "itemtype": "property", "name": "drawWait", @@ -715,7 +707,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 633, + "line": 625, "description": "fullRefreshWait is an additional debounce time waited before\ntotally updating the scene. This adds some", "itemtype": "property", "name": "fullRefreshWait", @@ -727,7 +719,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 644, + "line": 636, "description": "widgets references a collection of \"widget\" Objects, each of which\nshould reference a Module, a ModuleView, an operation to call upon the ModuleView,\nand any additional parameters required (specifications for the ModuleView to follow).", "itemtype": "property", "name": "widgets", @@ -738,7 +730,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 657, + "line": 649, "description": "requestedModuleViews is a computed property that returns\na dictionary of Modules -> ModuleViews , used to determine which views will be\nused by the scene. This is particularly useful when changing scenes to determine\nwhich Views need to be cleared out, and which will be used in the next scene.\n\nUsed as a searchable dictionary: `requestedModuleViews[moduleA][moduleViewA] => true`", "itemtype": "property", "name": "requestedModuleViews", @@ -748,7 +740,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 680, + "line": 672, "description": "clearUnusedViews sends a \"clear\" request to each ModuleView used by the current\ninstance of Visualizer, which isn't used in any of this scene's widgets.\nIn essence it ensures that any Views that are not currently in use are cleansed.", "itemtype": "method", "name": "clearUnusedViews", @@ -758,7 +750,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 708, + "line": 700, "description": "runWidgets iterated this scene's widgets, and requests that the ModuleView specified\nfor each widget executes the operation specified for each widget.\n\nFor example, it may tell one ModuleView, a word cloud, to draw itself, and\nanother ModuleView, a set of icons, to group themselves by common-words.", "itemtype": "method", "name": "runWidgets", @@ -768,7 +760,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 730, + "line": 722, "description": "_runWidget runs the current scene's operation for a single widget.\nWaits for repeating events to prevent multiple refreshes on the\nsame dimensions/parameters.", "itemtype": "method", "name": "_runWidget", @@ -783,7 +775,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 753, + "line": 745, "description": "reload initiates the process of updating the visualization by cleaning out old Views\nand updating all current widgets.\n\nPrevents rapid-exectuion by delaying each request by an amount of time specified\n by property drawWait, and afterward only using the most recent request (as a debounce).", "itemtype": "method", "name": "reload", @@ -796,7 +788,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 790, + "line": 782, "description": "loaded is a boolean variable indicating whether or the world is\nprepared to hold a visualization.\n\nCurrently it simply check's whether the world JQuery object exists", "itemtype": "property", "name": "loaded", @@ -806,7 +798,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 801, + "line": 793, "description": "$ is a method which returns the world's JQuery Object, worldObj.\nIf a parameter is passed, $ will attempt to find that parameter\nwithing the structure of the worldObj.", "itemtype": "method", "name": "$", @@ -826,7 +818,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 818, + "line": 810, "description": "resize recalculates the width, height, top, and left properties of the\nworldObj DOM Element\n\nThis method is automatically called when a World is created.", "itemtype": "method", "name": "resize", @@ -839,7 +831,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 841, + "line": 833, "description": "_bindGlobalEvents binds this World's resize event to the window's resize,\nsuch that every time the window's size changes this World attempts to\nupdate its properties to reflect the new window.\n\nPrivate, since this method is automatically called when a World is created.", "itemtype": "method", "name": "_bindGlobalEvents", @@ -854,7 +846,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 860, + "line": 852, "description": "_bindWorldEvents binds and generic event listeners that\noccur within the World's domain\n\nPrivate, since this method is automatically called when a World is created\nas well as when the worldObj changes to reference a new area.", "itemtype": "method", "name": "_bindWorldEvents", @@ -869,22 +861,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 878, - "description": "injectDefaultWorld clears out the Visualizer World's contents, injects the basic\nvisualizer skeleton", - "deprecated": true, - "deprecationMessage": "@todo Deprecate this. ModuleViews should take care of this on a per-App basis...", - "itemtype": "method", - "name": "injectDefaultWorld", - "return": { - "description": "", - "type": "Void" - }, - "class": "Visualizer.World", - "namespace": "Visualizer" - }, - { - "file": "build/js/j-visualizer.js", - "line": 898, + "line": 872, "description": "_handlePhasedButtonClick is called when an element with class phasedButton\nis clicked. Adds a class 'disabledItem' to the element for 2 seconds;\nif the element is clicked again before the class 'disabledItem' class expires,\nthe click will be ignored.", "itemtype": "method", "name": "_handlePhasedButtonClick", @@ -899,7 +876,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 924, + "line": 896, "description": "removeInstancesOf removes traces of a provided value from an Array", "itemtype": "method", "name": "removeInstancesOf", @@ -918,7 +895,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 948, + "line": 920, "description": "shuffleVals - Fisher-Yates algorithm for shuffling arrays\nin-place. (Essentially goes through each slot in array and\nswitches its value with one from a random slot...)", "itemtype": "method", "name": "shuffleVals", @@ -931,7 +908,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 978, + "line": 950, "description": "values takes an Object and returns its values\n(similar to `.keys()`)", "itemtype": "method", "name": "values", @@ -944,7 +921,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1000, + "line": 972, "description": "addExpiringClass adds a temporary class to a JQuery object.\nThe class has an expiry, after which it is removed.", "itemtype": "method", "name": "addExpiringClass", @@ -973,7 +950,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1033, + "line": 1005, "description": "truncateTo ensures a string is no longer than a given size limit.\n(In the case that it is longer, a suffix can be given for truncation)", "itemtype": "method", "name": "truncateTo", @@ -1000,7 +977,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1062, + "line": 1034, "description": "advancedIndexOf searches the object String for a parameter\nsubstring, allows additional options (such as case-insensitivity).", "itemtype": "method", "name": "advancedIndexOf", @@ -1026,7 +1003,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1089, + "line": 1061, "description": "includes searches the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "includes", @@ -1053,7 +1030,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1109, + "line": 1081, "description": "beginsWith searches the start of the object String for a parameter\nsubstring, returns boolean, accepts optional parameter\nto specify whether the search should be case-insensitive.", "itemtype": "method", "name": "beginsWith", @@ -1080,7 +1057,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1129, + "line": 1101, "description": "capitalizeLetter is a String capitalize function adapted from\nhttp://stackoverflow.com/a/3291856/624590 .\nCapitalizes the letter at position n of the object String.", "itemtype": "method", "name": "capitalizeLetter", @@ -1102,7 +1079,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1151, + "line": 1123, "description": "titleize creates a title-formatted copy of a String", "itemtype": "method", "name": "titleize", @@ -1115,7 +1092,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1167, + "line": 1139, "description": "removeInitialUnderscore removes the first leading underscore from a String", "itemtype": "method", "name": "removeInitialUnderscore", @@ -1128,7 +1105,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1196, + "line": 1168, "description": "existsWithValue checks if a values isn't null/undefined", "itemtype": "method", "name": "existsWithValue", @@ -1148,7 +1125,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1207, + "line": 1179, "description": "waitForRepeatingEvents is a debounce-like function for preventing\nmultiple execution. It should be called with a function and an\namount of time to wait. It can also be provided a timer name so as\nto namespace the blocked items. It can also be called with an Object\ntimer set to allow different objects to not prevent the execution of\nfunctions in others.", "itemtype": "method", "name": "waitForRepeatingEvents", @@ -1183,7 +1160,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1241, + "line": 1213, "description": "minVal takes two parameters, returns the smaller", "itemtype": "method", "name": "minVal", @@ -1208,7 +1185,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1257, + "line": 1229, "description": "maxVal takes two parameters, returns the larger", "itemtype": "method", "name": "maxVal", @@ -1233,7 +1210,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1273, + "line": 1245, "description": "boundedVal takes three parameters: an item, the lower bound,\nand the upper bound. If the item is between the bounds,\nthe item is returned, otherwise the failed bound is returned.", "itemtype": "method", "name": "boundedVal", @@ -1263,7 +1240,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1294, + "line": 1266, "description": "randBetween provides a random number between two values.", "itemtype": "method", "name": "randBetween", @@ -1292,7 +1269,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1312, + "line": 1284, "description": "randIntBetween provides a random (rounded) Integer between two values.", "itemtype": "method", "name": "randIntBetween", @@ -1317,7 +1294,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1324, + "line": 1296, "description": "isArray returns a flag of whether the parameter is of type Array", "itemtype": "method", "name": "isArray", @@ -1337,7 +1314,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1335, + "line": 1307, "description": "relativeSizeString parses an input size for either an explicit\nvalue, or a value in relationship to some parent value.\nE.g. \"50%\" of 900 = 450, \"50\" = 50, \"50px\" = 50", "itemtype": "method", "name": "relativeSizeString", @@ -1362,7 +1339,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1355, + "line": 1327, "description": "intersectionSafe is simple intersection code, iterates along two\nsorted arrays incrementing the index of the smaller value\n(if values are equal, it is part of intersection, and so store position and iterate both).\nReturns array of indices of intersecting values with respect to the first array passed.\n\nintersectionSafe is modified from code found on StackOverflow at:\nhttp://stackoverflow.com/a/1885660/624590", "itemtype": "method", "name": "intersectionSafe", @@ -1387,7 +1364,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1388, + "line": 1360, "description": "intersectionCount is a modified form of intersectionSafe that simply\nincrements a counter instead of building an intersection Array.\n(Faster because increments rather than pushing values to array,\nalso more memory efficient; JSPerf suggests 100% performance increase\n- beneficial for large datasets...)", "itemtype": "method", "name": "intersectionCount", @@ -1412,7 +1389,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1419, + "line": 1391, "description": "cloneArray creates a copy of an Array.", "deprecated": true, "deprecationMessage": "use Array.copy instead.", @@ -1434,7 +1411,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1521, + "line": 1470, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1445,7 +1422,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1530, + "line": 1479, "description": "maxLength is an integer size of how much data should be displayed.\nSometimes a project will collect more data than is practical to display\nto the user (either because it will be confusing, or otherwise too slow);\nthis property represents that limit.", "itemtype": "property", "name": "maxLength", @@ -1456,7 +1433,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1542, + "line": 1491, "description": "content is the full set of data (in Array , Ember.Array) form that is\navailable to this Module.\n\nNote: this attribute should only be accessed from the\ndata-management side of your app; it's where you dump data, and it's\nwhat you generally access for front-end filtering. This Module's\nModuleViews should not access the content, however - they should access\nthe dataset (which is a subset of content).", "itemtype": "property", "name": "content", @@ -1467,7 +1444,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1560, + "line": 1509, "description": "dataset is the subset of content used for current visualization.\nIt can potentially be the exact same data as content, in full,\nbut it can also be a limited/truncated version (often using the\nmaxLength property). It may also filtered down by properties, etc.\n\nModuleViews should only look here for their Module data.", "itemtype": "property", "name": "dataset", @@ -1478,7 +1455,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1575, + "line": 1524, "description": "moduleViews an object dictionary/map of Visualizer ModuleView objects,\neach of which must be relevant to this particular Module's data structuring.\n\nFor example, if this Module is a set of words with frequencies, a WordCloud\nmay be an applicable ModuleView.", "itemtype": "property", "name": "moduleViews", @@ -1489,7 +1466,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1590, + "line": 1539, "description": "init is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", "is_constructor": 1, "class": "Visualizer.Module", @@ -1497,7 +1474,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1606, + "line": 1555, "description": "requestRedraw sends a request to the current scene\nto redraw the widgets relevant to this module (and no others).", "itemtype": "method", "name": "requestRedraw", @@ -1510,7 +1487,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1622, + "line": 1571, "description": "forceLimit sorts the current data by a provided key, and selects only the\nfirst maxLength (property) items for this Module's dataset, ensuring that\nthe limit to the viewed-data's size is enforced.", "todo": [ "consider implementing a n-item max-heap data structure instead of sorting" @@ -1535,7 +1512,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1644, + "line": 1593, "description": "groupedBy creates a cached property on the Module to retrieve its data\nin the form of a two-dimensional Array, where the sub arrays contain\nthis Module's dataset split into sets that share a common (passed) property.\n\nThe outside Array is sorted by length, so the largest groups are at the start.\n\nSince the result is cached, it will only be recomputed when the dataset changes,\nkeeping this efficient. The first time you use groupBy for any given property\nafter the data changes (or is created) runs O(nlogn), but each subsequent access\nis simply O(1) as it simply grabs the previous data. Say what??? :P", "itemtype": "method", "name": "groupedBy", @@ -1555,7 +1532,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1676, + "line": 1625, "description": "_groupedBy groups the Module's dataset by a given property, returning\nan unsorted, two-dimensional array.\n\nThis method should not be called explicitly, instead developers should\ngo through the `groupedBy` method (no leading underscore), which\ncaches the groups (making redraws far more efficient)", "itemtype": "method", "name": "_groupedBy", @@ -1575,7 +1552,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1719, + "line": 1668, "description": "module is a reference to the parent Module for this ModuleView instance.", "itemtype": "property", "name": "module", @@ -1586,7 +1563,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1728, + "line": 1677, "description": "containerSelector is a string CSS selector used for finding\nthis ModuleView's window in a Visualization.\n\nOften unique, but occasionally multiple ModuleViews will be\nwritten to share a container.\n\nOften this property will be specified in a widget's parameters,\notherwise child classes to ModuleView should specify defaults.\nIf a widget does specify a `container` param, it will be set and used\nrunning any operation.", "itemtype": "property", "name": "containerSelector", @@ -1597,7 +1574,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1746, + "line": 1695, "description": "previousSelectors is a list history of selectors that were\npreviously set as this instance of a ModuleView's containerSelector.\n\nThis may be useful for navigation, or for cleaning up after a visualization.", "itemtype": "property", "name": "previousSelectors", @@ -1607,7 +1584,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1759, + "line": 1708, "description": "visualizer is a reference to the parent Visualizer instance.", "itemtype": "property", "name": "visualizer", @@ -1618,7 +1595,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1768, + "line": 1717, "description": "data is a reference to the visible data for visualization.", "itemtype": "property", "name": "data", @@ -1629,7 +1606,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1777, + "line": 1726, "description": "arrangedContent is a reference to all Module data (sorted/arranged).\nThis property should only seldom be accessed because it includes\ndata which is deemed irrelevant by the Module (filtered, etc.)\n\nIt may, however, be useful if a View decides to animate old data away\nupon filtering / limiting its viewable data.", "itemtype": "property", "name": "arrangedContent", @@ -1640,7 +1617,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1791, + "line": 1740, "description": "dimensionsDidChange is a flag used by ModuleViews to decide how much\nprocessing is required when they run an operation.\n\nIf all dimensions, including visible data, width, and height, are\nunchanged, often times the old Visualization can simply be shown.\n\nSet to true by default, so that ModuleViews can have a proper first-draw.", "itemtype": "property", "name": "dimensionsDidChange", @@ -1650,7 +1627,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1805, + "line": 1754, "description": "init is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", "is_constructor": 1, "class": "Visualizer.ModuleView", @@ -1658,7 +1635,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1818, + "line": 1767, "description": "clear cleanses/hides the current ModuleView from the visualization.\n\nThis method is often called when a widget representing the ModuleView\nleaves a visualization (either being removed from a scene,\nor not being part of a new scene.)\n\nEach ModuleView should implement/override this, and should\nprovide (at least) the following functionality:\n - hide the container/elements (to prevent overlap/event-disruption),\n - unset isDrawn so that next time we know to fully redraw, etc.\n\nOptionally, it should also empty the DOM Node/SVG to save memory", "itemtype": "method", "name": "clear", @@ -1671,7 +1648,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1837, + "line": 1786, "description": "destroy totally removes the current ModuleView from the visualization.\nThis should entirely empty and remove any DOM-or-SVG Elements from the\ndocument.\n\nThis method is rarely called unless the Visualizer is being removed entirely.\n\nEach ModuleView should implement/override this function.", "itemtype": "method", "name": "destroy", @@ -1684,7 +1661,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1853, + "line": 1802, "description": "run is used used to execute a widget's operation on a ModuleView.\nMany times additional parameters are passed, these assist in updating a\nModuleView by providing the widget's specifications (container, width,\nany data limitations, etc.)\n\nIf params includes a `container` key, its value will be used to define\nthis particular ModuleView's container viewport.", "itemtype": "method", "name": "run", @@ -1710,7 +1687,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1878, + "line": 1827, "description": "updateSelector takes a new containerSelector parameter, and uses it to\nchange this ModuleView's viewport. It also updates the `previousSelectors`\nhistory to contain the selector that was used before this method was called.", "itemtype": "method", "name": "updateSelector", @@ -1730,7 +1707,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1896, + "line": 1845, "description": "$container is a method which returns the ModuleView's container/viewport\nJQuery Object.\n\nIf a parameter is passed, $container will attempt to find that parameter\nwithing the structure of its container object.", "itemtype": "method", "name": "$container", @@ -1751,7 +1728,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1913, + "line": 1862, "description": "hardReset clears out the ModuleView and tells it that dimensionsDidChange,\nso the next redraw/execution is a fresh one (fully recalculated).\n\nThis is automatically called when the ModuleView's data changes.", "itemtype": "method", "name": "hardReset", @@ -1764,7 +1741,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1927, + "line": 1876, "description": "widgetParamedOutlineCSS provides an Object where keys/values map to CSS attributes\nrelevant to the container ONLY for manually specified dimensions/positions.\n\nThe point of this method is to provide access to data that can be used to set the\nstyle of the DOM element containing this ModuleView to the manually-set specifications.\n\nIf a developer opts to simply use a container's size/position, this will return an\nempty object.", "itemtype": "method", "name": "widgetParamedOutlineCSS", @@ -1785,7 +1762,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1957, + "line": 1906, "description": "width getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "width", @@ -1812,7 +1789,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1971, + "line": 1920, "description": "height getter/setter. Uses _updateDimension to coerce the set value\nto an expected format (as well as to determine whether a dimension changed).", "itemtype": "method", "name": "height", @@ -1839,7 +1816,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 1985, + "line": 1934, "description": "_updateDimension is used when setting width or height.\nIt accepts a key (which should be set to \"width\" or \"height\"),\nand a value.\n\nThe value is rounded down to the nearest integer to keep the DOM clean,\nand to keep determining changes simple.\n\nIf the value isn't the same as this ModuleView's previous value for the\nsame key property, dimensionsDidChange flag will be set true so that the\nModuleView knows to perform its next operation with full calculations.", "itemtype": "method", "name": "_updateDimension", @@ -1866,7 +1843,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2014, + "line": 1963, "description": "_presetContainerAttrs is used when running an operation to ensure that\nrequired attributes based on the viewport (such as available width/height)\nfor visualization are set.\n\nIf width or height are manually specified, this will not update that attribute -\nin these cases, the ModuleView should know how to handle explicit dimensions.\nThe \"resizable mixin\" can help with this (more details in _resizable_mixin file)", "itemtype": "method", "name": "_presetContainerAttrs", @@ -1887,7 +1864,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2063, + "line": 2012, "description": "run hijacks the ModuleView's run method to first attempt to update\nthe viewport's size based on the parameter specifications.\nAfter attempting to update the size/position of the viewport,\nthe ModuleView's run function is allowed to proceed.", "itemtype": "method", "name": "run", @@ -1913,7 +1890,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2082, + "line": 2031, "description": "_updateSize scans the widget-sent params for manually-set\nsize/position values, uses these to set up the ModuleView's\nrelevant attributes.", "itemtype": "method", "name": "_updateSize", @@ -1936,7 +1913,7 @@ }, { "file": "build/js/j-visualizer.js", - "line": 2119, + "line": 2068, "description": "_tryUpdateValue given a sizing/position-defining key and value,\nthis method attempts to parse the value and, if it's a relative\npercentage or String, coerce it to an integer.\n\nAllows values to be explicit (e.g. 50, or \"50px\"), or relative\nto the Visualizer's World (e.g. \"50%\"). Parameter relativeReq is\nused to specify which of the World's parameters should be used to\ndetermine a relative size (e.g. \"left\" uses the World's \"width\").\n\nparams may also specify an amount of padding.", "itemtype": "method", "name": "_tryUpdateValue", @@ -1980,21 +1957,17 @@ "message": "Missing item type\ninit is called upon creation of a Visualizer Object.\nIt is responsible for the initial processing and setup of the Object.", "line": " build/js/j-visualizer.js:83" }, - { - "message": "Missing item type\nAlias for Visualizer.World method: injectDefaultWorld", - "line": " build/js/j-visualizer.js:113" - }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Colorer Object.\nIt is responsible for the initial processing and setup of the Object.", - "line": " build/js/j-visualizer.js:257" + "line": " build/js/j-visualizer.js:249" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer Module Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init.\n\nIf the Module defines a setDefaultViews function (to prepopulate its\nModuleViews), that function will be called automatically.", - "line": " build/js/j-visualizer.js:1590" + "line": " build/js/j-visualizer.js:1539" }, { "message": "Missing item type\ninit is called upon creation of a Visualizer ModuleView Object.\nIt is responsible for the initial processing and setup of the Object.\n\nAny preprocessing that is required to make the Module valid should be\ndone, at latest, on init. By default it sets the parent Module reference.", - "line": " build/js/j-visualizer.js:1805" + "line": " build/js/j-visualizer.js:1754" } ] } \ No newline at end of file diff --git a/documentation/files/build_js_j-visualizer.js.html b/documentation/files/build_js_j-visualizer.js.html index 008fd51..92dbc15 100644 --- a/documentation/files/build_js_j-visualizer.js.html +++ b/documentation/files/build_js_j-visualizer.js.html @@ -218,14 +218,6 @@

      File: build/js/j-visualizer.js

      })); }, - /** - * Alias for Visualizer.World method: injectDefaultWorld - * @deprecated Use (visualizer).get('world').injectDefaultWorld() - */ - injectWorld: function() { - return this.get('world').injectDefaultWorld(); - }, - /** * addModule creates a Visualizer.Module object specified by the moduleClass parameter, * using a provided key (to allow differentiation and access). If (optional) content @@ -891,7 +883,7 @@

      File: build/js/j-visualizer.js

      */ (function() { - var defaultWorldTemplate, _handlePhasedButtonClick; + var _handlePhasedButtonClick; this.Visualizer.World = Ember.Object.extend({ @@ -981,25 +973,7 @@

      File: build/js/j-visualizer.js

      if (($world = this.$()).length) { return $world.off("click", ".phasedButton").on("click", ".phasedButton", _handlePhasedButtonClick); } - }).observes('worldObj').on('init'), - - /** - * injectDefaultWorld clears out the Visualizer World's contents, injects the basic - * visualizer skeleton - * - * @deprecated @todo Deprecate this. ModuleViews should take care of this on a per-App basis... - * - * @method injectDefaultWorld - * @return {void} - */ - injectDefaultWorld: function() { - if (typeof console !== "undefined" && console !== null) { - if (typeof console.warn === "function") { - console.warn("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version."); - } - } - return this.$().empty().append($(defaultWorldTemplate)); - } + }).observes('worldObj').on('init') }); @@ -1024,8 +998,6 @@

      File: build/js/j-visualizer.js

      }); }; - defaultWorldTemplate = "<div id='static-area' class='static-area'> <div id='visualizer-loading-indicator'> </div> </div> <div id='shared-area' class='shared-area'> </div>"; - }).call(this); @@ -1544,29 +1516,6 @@

      File: build/js/j-visualizer.js

      }; - /* - * Previously Globally defined functions... - */ - - window.waitForRepeatingEvents = function() { - if (typeof console !== "undefined" && console !== null) { - if (typeof console.log === "function") { - console.log("Global Namespace for waitForRepeatingEvents function is deprecated, please use Visualizer.Utils.waitForRepeatingEvents"); - } - } - return Visualizer.Utils.waitForRepeatingEvents.apply(window, arguments); - }; - - window.existsWithValue = function() { - if (typeof console !== "undefined" && console !== null) { - if (typeof console.log === "function") { - console.log("Global Namespace for existsWithValue function is deprecated, please use Visualizer.Utils.existsWithValue"); - } - } - return Visualizer.Utils.existsWithValue.apply(window, arguments); - }; - - /* * FUN! */ diff --git a/src/j_visualizer.js.coffee b/src/j_visualizer.js.coffee index 5edcfdc..6d6435f 100644 --- a/src/j_visualizer.js.coffee +++ b/src/j_visualizer.js.coffee @@ -91,12 +91,6 @@ worldObj: $ world visualizer: this - ###* - # Alias for Visualizer.World method: injectDefaultWorld - # @deprecated Use (visualizer).get('world').injectDefaultWorld() - ### - injectWorld: () -> @get('world').injectDefaultWorld() - ###* # addModule creates a Visualizer.Module object specified by the moduleClass parameter, # using a provided key (to allow differentiation and access). If (optional) content diff --git a/src/utils/vis_utils.js.coffee b/src/utils/vis_utils.js.coffee index a30653d..deb4883 100644 --- a/src/utils/vis_utils.js.coffee +++ b/src/utils/vis_utils.js.coffee @@ -197,24 +197,6 @@ console?.log? "cloneArray function is deprecated, please use Array.copy()" inputArray.slice 0 -### -# Previously Globally defined functions... -### - -# This seems to be failing for the window[func] approach :( -# for func in ['existsWithValue'] -# window[func] = -> -# console?.log? "Global Namespace for #{func} function is deprecated, please use Visualizer.Utils.#{func}" -# Visualizer.Utils[func].apply window, arguments - -window.waitForRepeatingEvents = () -> - console?.log? "Global Namespace for waitForRepeatingEvents function is deprecated, please use Visualizer.Utils.waitForRepeatingEvents" - Visualizer.Utils.waitForRepeatingEvents.apply window, arguments - -window.existsWithValue = () -> - console?.log? "Global Namespace for existsWithValue function is deprecated, please use Visualizer.Utils.existsWithValue" - Visualizer.Utils.existsWithValue.apply window, arguments - ### # FUN! ### diff --git a/src/vis_world.js.coffee b/src/vis_world.js.coffee index d096076..2b2fc1b 100644 --- a/src/vis_world.js.coffee +++ b/src/vis_world.js.coffee @@ -81,19 +81,6 @@ $world.off("click", ".phasedButton").on("click", ".phasedButton", _handlePhasedButtonClick) ).observes('worldObj').on('init') - ###* - # injectDefaultWorld clears out the Visualizer World's contents, injects the basic - # visualizer skeleton - # - # @deprecated @todo Deprecate this. ModuleViews should take care of this on a per-App basis... - # - # @method injectDefaultWorld - # @return {void} - ### - injectDefaultWorld: ()-> - console?.warn?("INJECT WORLD IS TOTALLY, ENTIRELY DEPRECATED! Please fix your app now - it will be removed in the next version.") - @$().empty().append $(defaultWorldTemplate) - ###* # _handlePhasedButtonClick is called when an element with class phasedButton # is clicked. Adds a class 'disabledItem' to the element for 2 seconds; @@ -110,13 +97,3 @@ _handlePhasedButtonClick = (e) -> return false Ember.run.next @, -> $(this).addExpiringClass "disabledItem", 2000 - -# Private: -# TODO: Emberize, make this a real template/view. -# Alternatively: REMOVE, allow each moduleView to ensure it's own parts exist -defaultWorldTemplate = " -
      -
      -
      -
      -" From 2f8f8ec17ccf7fd33f414118474ada62bb6582e2 Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Mon, 12 May 2014 12:36:12 -0400 Subject: [PATCH 6/7] Fix issue with moduleView hardReset (previously caused flickering, or even false sizing data, when view's clear implementation hid the container) --- build/j-visualizer.min.js | 2 +- build/js/j-visualizer.js | 2 +- documentation/files/build_js_j-visualizer.js.html | 2 +- spec/module_views/module_views_spec.js | 3 +-- src/module_views/_module_view.js.coffee | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build/j-visualizer.min.js b/build/j-visualizer.min.js index fccbb2e..da9897c 100644 --- a/build/j-visualizer.min.js +++ b/build/j-visualizer.min.js @@ -1 +1 @@ -(function(){var a,b={}.hasOwnProperty;this.Visualizer=a=Ember.Object.extend({world:null,scenes:Ember.computed(function(){return{}}),modules:Ember.computed(function(){return Ember.Object.create()}).property(),associations:Ember.computed(function(){return Ember.Object.create()}).property(),timers:Ember.computed(function(){return{}}),init:function(b){return this.useWorld(b),this.set("color",a.Colorer.create({visualizer:this}))},useWorld:function(b){return this.set("world",a.World.create({worldObj:$(b),visualizer:this}))},addModule:function(a,b,c){var d;return d=a.create({visualizer:this,key:b}),this.set("modules."+b,d),null!=c&&this.set("modules."+b+".content",c),d.requestRedraw()},refresh:function(){var a;return this.get("world.loaded")&&null!=(a=this.get("currentScene"))?a.reload():void 0}.observes("currentScene","world.worldObj","world.loaded","world.width","world.height"),useScenes:function(b){var c,d,e,f;for(null==b&&(b=[]),a.Utils.isArray(b)||("undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Object({})-type input for useScenes is deprecated - please pass an Array instead..."),b=b.visualizer_scenes),f=[],d=0,e=b.length;e>d;d++)c=b[d],c.visualizer=this,f.push(this.set("scenes."+c.identifier,a.Scene.create(c)));return f},setScene:function(a){return this.set("currentScene",this.get("scenes."+a))},destroy:function(){var a,c,d,e;d=this.get("modules"),e=[];for(c in d)b.call(d,c)&&(a=d[c],e.push("function"==typeof a.destroy?a.destroy():void 0));return e}})}).call(this),function(){this.Visualizer.Colorer=Ember.Object.extend({visualizer:null,init:function(){return this.get("_assignedUniq"),this.get("uniquePalette"),this._setUniqueProps()},freshColorPalette:function(){return this.get("_colorScheme").copy()},fixed:function(a){return null==a&&(a=""),null!=a&&(a=""+a.toLowerCase()).length?this.get("_fixedVals."+a)||this._rotating_color(a):this.get("_defaultVal")},uniquePalette:Ember.computed(function(){return{}}),_assignedUniq:Ember.computed(function(){return{}}),unique:function(a,b){return null==a&&(a=""),null==b&&(b="main"),this.get("_assignedUniq."+b+"."+a)},_setUniqueProps:function(){return this.unique.next=function(a){return function(b){return null==b&&(b="main"),a.unique._prepareSet(b),a.get("uniquePalette."+b+".0")}}(this),this.unique.assign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&null==a.unique(b,c)?(d=a.get("uniquePalette."+c).shift()||a.get("_defaultAssigned"),a.set("_assignedUniq."+c+"."+b,d)):void 0}}(this),this.unique.unassign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&(d=a.unique(b,c),null!=d&&d!==a.get("_defaultUnassigned"))?(d!==a.get("_defaultAssigned")&&a.get("uniquePalette."+c).push(d),delete a.get("_assignedUniq."+c)[b],a.get("uniquePalette."+c+".0")):void 0}}(this),this.unique.resetSet=function(a){return function(b){return a.get("_assignedUniq")[b]={},a.get("uniquePalette")[b]=a.freshColorPalette().shuffleVals()}}(this),this.unique._prepareSet=function(a){return function(b){return null==a.get("uniquePalette."+b)?a.unique.resetSet(b):void 0}}(this)},_defaultAssigned:"#5895B2",_defaultUnassigned:"#8da3b0",_colorScheme:["#3498DB","#9B59B6","#F2CA27","#34495E","#1ABC9C","#E74C3C","#95A5A6","#ECF0F1","#2ECC71","#5895B2"],_rotating_color_val:Ember.computed(function(){return{}}),_rotating_keys_used:0,_rotating_color:function(a){var b,c;return null!=a?((b=this.get("_rotating_color_val."+a))||(c=this.get("_colorScheme"),b=c[this._rotating_keys_used++%c.length],this.set("_rotating_color_val."+a,b)),b):void 0},_defaultVal:Ember.computed(function(){var a;return(null!=(a=window.colors)?a.defaultSingle:void 0)||this.get("_defaultAssigned")}),_fixedVals:{blog:"#28cfc5",board:"#FB913F",twitter:"#2AA9E0",facebook:"#4D69A2",google:"#DD4C39",youtube:"#E14D42",instagram:"#FFCB33",linkedin:"#1E87BD",male:"#29A0CE",unisex:"#d6dadb",female:"#FC4482",positive:"#74B81D",negative:"#E74C3C",neutral:"#A8CEE0",unknown:"#d6dadb"}})}.call(this),function(){var a={}.hasOwnProperty;this.Visualizer.Scene=Ember.Object.extend({visualizer:null,identifier:null,title:null,description:null,drawWait:100,fullRefreshWait:20,widgets:Ember.computed(function(){return[]}),requestedModuleViews:function(){var a,b,c,d,e,f,g;for(b={},g=this.get("widgets"),d=0,e=g.length;e>d;d++)c=g[d],a=null!=b[f=c.module]?b[f]:b[f]={},a[c.view]=!0;return b}.property("widgets.@each"),clearUnusedViews:function(){var b,c,d,e,f,g;f=this.get("visualizer.modules");for(c in f)if(a.call(f,c)){b=f[c],g=b.get("moduleViews");for(e in g)a.call(g,e)&&(d=g[e],this.get("requestedModuleViews."+c+"."+e)||"function"==typeof d.clear&&d.clear())}return this},runWidgets:function(a){var b,c,d;for(null==a&&(a=this.get("widgets")),c=0,d=a.length;d>c;c++)b=a[c],this._runWidget(b);return this},_runWidget:function(a){var b;return null==a&&(a={}),b="visualizer.modules."+a.module+".moduleViews."+a.view,Visualizer.Utils.waitForRepeatingEvents(function(c){return function(){var d;return null!=(d=c.get(b))?d.run(a.operation,a.params):void 0}}(this),this.get("drawWait"),"Scene Redraw for "+b,this.get("visualizer.timers"))},reload:function(){return Visualizer.Utils.waitForRepeatingEvents(function(a){return function(){return a.clearUnusedViews(),a.runWidgets()}}(this),this.get("fullRefreshWait"),"Full Scene Reload",this.get("visualizer.timers"))}})}.call(this),function(){var a;this.Visualizer.World=Ember.Object.extend({loaded:Ember.computed.gt("worldObj.length",0),$:function(a){return null!=a?this.get("worldObj").find(a):this.get("worldObj")},resize:function(){var a,b,c;return a=this.get("worldObj"),a.length?(b=this.get("worldObj").offset(),this.setProperties({width:a.innerWidth(),height:c=a.innerHeight(),top:b.top,left:b.left})):void 0}.observes("worldObj").on("init"),_bindGlobalEvents:function(){return $(window).on("resize",function(a){return function(){return a.resize()}}(this))}.on("init"),_bindWorldEvents:function(){var b;return(b=this.$()).length?b.off("click",".phasedButton").on("click",".phasedButton",a):void 0}.observes("worldObj").on("init")}),a=function(a){return $(this).hasClass("disabledItem")?(a.stopImmediatePropagation(),!1):Ember.run.next(this,function(){return $(this).addExpiringClass("disabledItem",2e3)})}}.call(this),function(){Array.prototype.removeInstancesOf=function(a){for(var b;;){if(-1===(b=this.indexOf(a)))break;this.splice(b,1)}return this},Array.prototype.shuffleVals=function(){var a,b,c,d,e,f;for(a=e=0,f=this.length;f>e;a=++e)b=this[a],c=Math.floor(Math.random()*(a+1)),d=b,this[a]=this[c],this[c]=d;return this}}.call(this),function(){var a={}.hasOwnProperty;Ember.Object.reopen({values:function(){var b,c,d;d=[];for(b in this)a.call(this,b)&&(c=this[b],d.push(c));return d}})}.call(this),function(){jQuery.fn.extend({addExpiringClass:function(a,b){return null==a&&(a="disabled"),null==b&&(b=1e3),this.addClass(a),setTimeout(function(b){return function(){return b.removeClass(a)}}(this),b)}})}.call(this),function(){String.prototype.truncateTo=function(a,b){var c;return null==b&&(b="…"),c=b.length,(isNaN(a)||c>=a)&&(a=b.length+1),this.length>a?this.substr(0,a-c)+b:this},String.prototype.advancedIndexOf=function(a,b){var c;return null==b&&(b={}),c=this,b.isCaseInsensitive&&(c=c.toLowerCase(),a=a.toLowerCase()),c.indexOf(a)},String.prototype.includes=function(a,b){return this.advancedIndexOf(a,{isCaseInsensitive:b})>=0},String.prototype.beginsWith=function(a,b){return 0===this.advancedIndexOf(a,{isCaseInsensitive:b})},String.prototype.capitalizeLetter=function(a){var b;return null==a&&(a=0),b=0===a?"":this.slice(0,a),b+this.charAt(a).toUpperCase()+this.slice(a+1)},String.prototype.titleize=function(){return this.toLowerCase().replace(/\b\w/g,function(a){return a.toUpperCase()})},String.prototype.removeInitialUnderscore=function(){return this.replace(/^_/,"")}}.call(this),function(){var a;this.Visualizer.Utils={existsWithValue:function(a){return"undefined"!=typeof a&&null!==a},waitForRepeatingEvents:function(){var a,b;return b={},a=function(a,c,d,e){var f;return null==d&&(d="default timer"),null==e&&(e=b),f=e[d],f&&clearTimeout(f),e[d]=setTimeout(a,c)}}(),minVal:function(a,b){return b>=a?a:b},maxVal:function(a,b){return a>=b?a:b},boundedVal:function(a,b,c){return b>a?b:a>c?c:a},randBetween:function(a,b){return null==a&&(a=0),null==b&&(b=10),Math.random()*(b-a)+a},randIntBetween:function(a,b){return Math.floor(Visualizer.Utils.randBetween(a,b)||4)},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},relativeSizeString:function(a,b){var c;return c=parseInt(a),"string"==typeof a&&a.indexOf("%")>=0?c/100*b:isFinite(c)?c:void 0},intersectionSafe:function(a,b){var c,d,e;for(c=0,d=0,e=[];cb[d]?d++:(e.push(c),c++,d++);return e},intersectionCount:function(a,b){var c,d,e;for(c=0,d=0,e=0;cb[d]?d++:(e++,c++,d++);return e},cloneArray:function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("cloneArray function is deprecated, please use Array.copy()"),a.slice(0)}},Visualizer.Utils.updateKCodePosition=function(a,b){return 38===a?2>b?2>b&&(b+=1):b>2&&(b=1):(40!==a||2!==b&&3!==b)&&(37!==a||4!==b&&6!==b)&&(39!==a||5!==b&&7!==b)?66===a&&8===b?b+=1:b=65===a&&9===b?10:0:b+=1,b},a=function(a,b){return a>8&&(a=Math.floor(10*Math.random()+a-5)),b>8&&(b=Math.floor(10*Math.random()+b-5)),"http://placekitten.com/"+a+"/"+b}}.call(this),function(){this.Visualizer.Module=Ember.ArrayController.extend({visualizer:null,maxLength:100,content:Ember.computed(function(){return Ember.A()}).property(),dataset:Ember.computed.alias("arrangedContent"),moduleViews:Ember.computed(function(){return Ember.Object.create()}).property(),init:function(){return"function"==typeof this.setDefaultViews?this.setDefaultViews():void 0},requestRedraw:function(){var a,b,c;return b=this.get("visualizer.currentScene"),a=this.get("key"),null!=b&&null!=a?b.runWidgets(null!=(c=b.get("widgets"))?c.filterBy("module",a):void 0):void 0},forceLimit:function(a){var b;return null==a&&(a="timestamp"),b=this.get("dataset").sort(function(b,c){return c[a]-b[a]}),this.set("dataset",b.slice(0,this.get("maxLength")))},groupedBy:function(a){var b,c,d,e;return b=a.replace(".","__"),c="__groupedBy_"+b,null==(e=this.get(c))&&(d={},d[c]=function(){return this._groupedBy(a).sort(function(a,b){return b.length-a.length})}.property("dataset.@each."+a),this.reopen(d)),e||this.get(c)},_groupedBy:function(a){var b,c,d,e,f,g;for(b=Ember.Object.create(),g=this.get("dataset"),e=0,f=g.length;f>e;e++)c=g[e],d=Ember.get(c,a),(null!=b[d]?b[d]:b[d]=[]).push(c);return b.values()}})}.call(this),function(){this.Visualizer.ModuleView=Ember.Object.extend({module:null,containerSelector:null,previousSelectors:Ember.computed(function(){return[]}),visualizer:Ember.computed.alias("module.visualizer"),data:Ember.computed.alias("module.dataset"),arrangedContent:Ember.computed.alias("module.arrangedContent"),dimensionsDidChange:!0,init:function(a){return this.set("module",a)},clear:function(){},destroy:function(){return this.clear()},run:function(a,b){return null==b&&(b={}),b.container&&this.updateSelector(b.container),this._presetContainerAttrs(b),"function"==typeof this[a]?this[a](b):void 0},updateSelector:function(a){var b;return a!==(b=this.get("containerSelector"))?(this.clear(),this.get("previousSelectors").push(b),this.set("containerSelector",a)):void 0},$container:function(a){var b;return b=a?" "+a:"",this.get("visualizer.world").$(""+this.get("containerSelector")+b)},hardReset:function(){return this.set("dimensionsDidChange",!0),this.run("clear")}.observes("data"),widgetParamedOutlineCSS:function(a){var b,c,d,e,f;for(null==a&&(a={}),b={},f=["width","height","left","top"],d=0,e=f.length;e>d;d++)c=f[d],null!=a[c]&&(b[c]=""+this.get(c)+"px");return b},width:function(a,b){return this._updateDimension(a,b)}.property(),height:function(a,b){return this._updateDimension(a,b)}.property(),_updateDimension:function(a,b){var c;return null!=b&&(b=Math.floor(b),b!==(c=this.get(a))&&this.set("dimensionsDidChange",!0)),b},_presetContainerAttrs:function(a){var b;return null==a&&(a={}),null!=a.width&&null!=a.height||(b=this.$container(),null==a.width&&this.set("width",b.width()),null!=a.height)?void 0:this.set("height",b.height())}})}.call(this),function(){Visualizer.ModuleView.ResizableMixin=Ember.Mixin.create({run:function(a,b){return null==b&&(b={}),this._updateSize(b),this._super(a,b)},_updateSize:function(a){var b,c,d,e,f;for(null==a&&(a={}),this.get("visualizer.world").resize(),e=[{key:"width"},{key:"height"},{key:"left",req:"width"},{key:"top",req:"height"}],f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(this._tryUpdateValue(b.key,a[b.key],a,b.req));return f},_tryUpdateValue:function(a,b,c,d){var e,f;return null==c&&(c={}),null==d&&(d=a),null!=b&&(null!=c.padding&&(f=Visualizer.Utils.relativeSizeString(c.padding,this.get("visualizer.world."+d))),f=null!=f?f:15,e=Math.floor(Visualizer.Utils.relativeSizeString(b,this.get("visualizer.world."+d))-f),isFinite(e)&&this.get(a)!==e)?(this.set(a,e),!0):!1}})}.call(this); \ No newline at end of file +(function(){var a,b={}.hasOwnProperty;this.Visualizer=a=Ember.Object.extend({world:null,scenes:Ember.computed(function(){return{}}),modules:Ember.computed(function(){return Ember.Object.create()}).property(),associations:Ember.computed(function(){return Ember.Object.create()}).property(),timers:Ember.computed(function(){return{}}),init:function(b){return this.useWorld(b),this.set("color",a.Colorer.create({visualizer:this}))},useWorld:function(b){return this.set("world",a.World.create({worldObj:$(b),visualizer:this}))},addModule:function(a,b,c){var d;return d=a.create({visualizer:this,key:b}),this.set("modules."+b,d),null!=c&&this.set("modules."+b+".content",c),d.requestRedraw()},refresh:function(){var a;return this.get("world.loaded")&&null!=(a=this.get("currentScene"))?a.reload():void 0}.observes("currentScene","world.worldObj","world.loaded","world.width","world.height"),useScenes:function(b){var c,d,e,f;for(null==b&&(b=[]),a.Utils.isArray(b)||("undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("Object({})-type input for useScenes is deprecated - please pass an Array instead..."),b=b.visualizer_scenes),f=[],d=0,e=b.length;e>d;d++)c=b[d],c.visualizer=this,f.push(this.set("scenes."+c.identifier,a.Scene.create(c)));return f},setScene:function(a){return this.set("currentScene",this.get("scenes."+a))},destroy:function(){var a,c,d,e;d=this.get("modules"),e=[];for(c in d)b.call(d,c)&&(a=d[c],e.push("function"==typeof a.destroy?a.destroy():void 0));return e}})}).call(this),function(){this.Visualizer.Colorer=Ember.Object.extend({visualizer:null,init:function(){return this.get("_assignedUniq"),this.get("uniquePalette"),this._setUniqueProps()},freshColorPalette:function(){return this.get("_colorScheme").copy()},fixed:function(a){return null==a&&(a=""),null!=a&&(a=""+a.toLowerCase()).length?this.get("_fixedVals."+a)||this._rotating_color(a):this.get("_defaultVal")},uniquePalette:Ember.computed(function(){return{}}),_assignedUniq:Ember.computed(function(){return{}}),unique:function(a,b){return null==a&&(a=""),null==b&&(b="main"),this.get("_assignedUniq."+b+"."+a)},_setUniqueProps:function(){return this.unique.next=function(a){return function(b){return null==b&&(b="main"),a.unique._prepareSet(b),a.get("uniquePalette."+b+".0")}}(this),this.unique.assign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&null==a.unique(b,c)?(d=a.get("uniquePalette."+c).shift()||a.get("_defaultAssigned"),a.set("_assignedUniq."+c+"."+b,d)):void 0}}(this),this.unique.unassign=function(a){return function(b,c){var d;return null==c&&(c="main"),a.unique._prepareSet(c),null!=b&&(d=a.unique(b,c),null!=d&&d!==a.get("_defaultUnassigned"))?(d!==a.get("_defaultAssigned")&&a.get("uniquePalette."+c).push(d),delete a.get("_assignedUniq."+c)[b],a.get("uniquePalette."+c+".0")):void 0}}(this),this.unique.resetSet=function(a){return function(b){return a.get("_assignedUniq")[b]={},a.get("uniquePalette")[b]=a.freshColorPalette().shuffleVals()}}(this),this.unique._prepareSet=function(a){return function(b){return null==a.get("uniquePalette."+b)?a.unique.resetSet(b):void 0}}(this)},_defaultAssigned:"#5895B2",_defaultUnassigned:"#8da3b0",_colorScheme:["#3498DB","#9B59B6","#F2CA27","#34495E","#1ABC9C","#E74C3C","#95A5A6","#ECF0F1","#2ECC71","#5895B2"],_rotating_color_val:Ember.computed(function(){return{}}),_rotating_keys_used:0,_rotating_color:function(a){var b,c;return null!=a?((b=this.get("_rotating_color_val."+a))||(c=this.get("_colorScheme"),b=c[this._rotating_keys_used++%c.length],this.set("_rotating_color_val."+a,b)),b):void 0},_defaultVal:Ember.computed(function(){var a;return(null!=(a=window.colors)?a.defaultSingle:void 0)||this.get("_defaultAssigned")}),_fixedVals:{blog:"#28cfc5",board:"#FB913F",twitter:"#2AA9E0",facebook:"#4D69A2",google:"#DD4C39",youtube:"#E14D42",instagram:"#FFCB33",linkedin:"#1E87BD",male:"#29A0CE",unisex:"#d6dadb",female:"#FC4482",positive:"#74B81D",negative:"#E74C3C",neutral:"#A8CEE0",unknown:"#d6dadb"}})}.call(this),function(){var a={}.hasOwnProperty;this.Visualizer.Scene=Ember.Object.extend({visualizer:null,identifier:null,title:null,description:null,drawWait:100,fullRefreshWait:20,widgets:Ember.computed(function(){return[]}),requestedModuleViews:function(){var a,b,c,d,e,f,g;for(b={},g=this.get("widgets"),d=0,e=g.length;e>d;d++)c=g[d],a=null!=b[f=c.module]?b[f]:b[f]={},a[c.view]=!0;return b}.property("widgets.@each"),clearUnusedViews:function(){var b,c,d,e,f,g;f=this.get("visualizer.modules");for(c in f)if(a.call(f,c)){b=f[c],g=b.get("moduleViews");for(e in g)a.call(g,e)&&(d=g[e],this.get("requestedModuleViews."+c+"."+e)||"function"==typeof d.clear&&d.clear())}return this},runWidgets:function(a){var b,c,d;for(null==a&&(a=this.get("widgets")),c=0,d=a.length;d>c;c++)b=a[c],this._runWidget(b);return this},_runWidget:function(a){var b;return null==a&&(a={}),b="visualizer.modules."+a.module+".moduleViews."+a.view,Visualizer.Utils.waitForRepeatingEvents(function(c){return function(){var d;return null!=(d=c.get(b))?d.run(a.operation,a.params):void 0}}(this),this.get("drawWait"),"Scene Redraw for "+b,this.get("visualizer.timers"))},reload:function(){return Visualizer.Utils.waitForRepeatingEvents(function(a){return function(){return a.clearUnusedViews(),a.runWidgets()}}(this),this.get("fullRefreshWait"),"Full Scene Reload",this.get("visualizer.timers"))}})}.call(this),function(){var a;this.Visualizer.World=Ember.Object.extend({loaded:Ember.computed.gt("worldObj.length",0),$:function(a){return null!=a?this.get("worldObj").find(a):this.get("worldObj")},resize:function(){var a,b,c;return a=this.get("worldObj"),a.length?(b=this.get("worldObj").offset(),this.setProperties({width:a.innerWidth(),height:c=a.innerHeight(),top:b.top,left:b.left})):void 0}.observes("worldObj").on("init"),_bindGlobalEvents:function(){return $(window).on("resize",function(a){return function(){return a.resize()}}(this))}.on("init"),_bindWorldEvents:function(){var b;return(b=this.$()).length?b.off("click",".phasedButton").on("click",".phasedButton",a):void 0}.observes("worldObj").on("init")}),a=function(a){return $(this).hasClass("disabledItem")?(a.stopImmediatePropagation(),!1):Ember.run.next(this,function(){return $(this).addExpiringClass("disabledItem",2e3)})}}.call(this),function(){Array.prototype.removeInstancesOf=function(a){for(var b;;){if(-1===(b=this.indexOf(a)))break;this.splice(b,1)}return this},Array.prototype.shuffleVals=function(){var a,b,c,d,e,f;for(a=e=0,f=this.length;f>e;a=++e)b=this[a],c=Math.floor(Math.random()*(a+1)),d=b,this[a]=this[c],this[c]=d;return this}}.call(this),function(){var a={}.hasOwnProperty;Ember.Object.reopen({values:function(){var b,c,d;d=[];for(b in this)a.call(this,b)&&(c=this[b],d.push(c));return d}})}.call(this),function(){jQuery.fn.extend({addExpiringClass:function(a,b){return null==a&&(a="disabled"),null==b&&(b=1e3),this.addClass(a),setTimeout(function(b){return function(){return b.removeClass(a)}}(this),b)}})}.call(this),function(){String.prototype.truncateTo=function(a,b){var c;return null==b&&(b="…"),c=b.length,(isNaN(a)||c>=a)&&(a=b.length+1),this.length>a?this.substr(0,a-c)+b:this},String.prototype.advancedIndexOf=function(a,b){var c;return null==b&&(b={}),c=this,b.isCaseInsensitive&&(c=c.toLowerCase(),a=a.toLowerCase()),c.indexOf(a)},String.prototype.includes=function(a,b){return this.advancedIndexOf(a,{isCaseInsensitive:b})>=0},String.prototype.beginsWith=function(a,b){return 0===this.advancedIndexOf(a,{isCaseInsensitive:b})},String.prototype.capitalizeLetter=function(a){var b;return null==a&&(a=0),b=0===a?"":this.slice(0,a),b+this.charAt(a).toUpperCase()+this.slice(a+1)},String.prototype.titleize=function(){return this.toLowerCase().replace(/\b\w/g,function(a){return a.toUpperCase()})},String.prototype.removeInitialUnderscore=function(){return this.replace(/^_/,"")}}.call(this),function(){var a;this.Visualizer.Utils={existsWithValue:function(a){return"undefined"!=typeof a&&null!==a},waitForRepeatingEvents:function(){var a,b;return b={},a=function(a,c,d,e){var f;return null==d&&(d="default timer"),null==e&&(e=b),f=e[d],f&&clearTimeout(f),e[d]=setTimeout(a,c)}}(),minVal:function(a,b){return b>=a?a:b},maxVal:function(a,b){return a>=b?a:b},boundedVal:function(a,b,c){return b>a?b:a>c?c:a},randBetween:function(a,b){return null==a&&(a=0),null==b&&(b=10),Math.random()*(b-a)+a},randIntBetween:function(a,b){return Math.floor(Visualizer.Utils.randBetween(a,b)||4)},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},relativeSizeString:function(a,b){var c;return c=parseInt(a),"string"==typeof a&&a.indexOf("%")>=0?c/100*b:isFinite(c)?c:void 0},intersectionSafe:function(a,b){var c,d,e;for(c=0,d=0,e=[];cb[d]?d++:(e.push(c),c++,d++);return e},intersectionCount:function(a,b){var c,d,e;for(c=0,d=0,e=0;cb[d]?d++:(e++,c++,d++);return e},cloneArray:function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log("cloneArray function is deprecated, please use Array.copy()"),a.slice(0)}},Visualizer.Utils.updateKCodePosition=function(a,b){return 38===a?2>b?2>b&&(b+=1):b>2&&(b=1):(40!==a||2!==b&&3!==b)&&(37!==a||4!==b&&6!==b)&&(39!==a||5!==b&&7!==b)?66===a&&8===b?b+=1:b=65===a&&9===b?10:0:b+=1,b},a=function(a,b){return a>8&&(a=Math.floor(10*Math.random()+a-5)),b>8&&(b=Math.floor(10*Math.random()+b-5)),"http://placekitten.com/"+a+"/"+b}}.call(this),function(){this.Visualizer.Module=Ember.ArrayController.extend({visualizer:null,maxLength:100,content:Ember.computed(function(){return Ember.A()}).property(),dataset:Ember.computed.alias("arrangedContent"),moduleViews:Ember.computed(function(){return Ember.Object.create()}).property(),init:function(){return"function"==typeof this.setDefaultViews?this.setDefaultViews():void 0},requestRedraw:function(){var a,b,c;return b=this.get("visualizer.currentScene"),a=this.get("key"),null!=b&&null!=a?b.runWidgets(null!=(c=b.get("widgets"))?c.filterBy("module",a):void 0):void 0},forceLimit:function(a){var b;return null==a&&(a="timestamp"),b=this.get("dataset").sort(function(b,c){return c[a]-b[a]}),this.set("dataset",b.slice(0,this.get("maxLength")))},groupedBy:function(a){var b,c,d,e;return b=a.replace(".","__"),c="__groupedBy_"+b,null==(e=this.get(c))&&(d={},d[c]=function(){return this._groupedBy(a).sort(function(a,b){return b.length-a.length})}.property("dataset.@each."+a),this.reopen(d)),e||this.get(c)},_groupedBy:function(a){var b,c,d,e,f,g;for(b=Ember.Object.create(),g=this.get("dataset"),e=0,f=g.length;f>e;e++)c=g[e],d=Ember.get(c,a),(null!=b[d]?b[d]:b[d]=[]).push(c);return b.values()}})}.call(this),function(){this.Visualizer.ModuleView=Ember.Object.extend({module:null,containerSelector:null,previousSelectors:Ember.computed(function(){return[]}),visualizer:Ember.computed.alias("module.visualizer"),data:Ember.computed.alias("module.dataset"),arrangedContent:Ember.computed.alias("module.arrangedContent"),dimensionsDidChange:!0,init:function(a){return this.set("module",a)},clear:function(){},destroy:function(){return this.clear()},run:function(a,b){return null==b&&(b={}),b.container&&this.updateSelector(b.container),this._presetContainerAttrs(b),"function"==typeof this[a]?this[a](b):void 0},updateSelector:function(a){var b;return a!==(b=this.get("containerSelector"))?(this.clear(),this.get("previousSelectors").push(b),this.set("containerSelector",a)):void 0},$container:function(a){var b;return b=a?" "+a:"",this.get("visualizer.world").$(""+this.get("containerSelector")+b)},hardReset:function(){return this.set("dimensionsDidChange",!0),this.get("module").requestRedraw()}.observes("data"),widgetParamedOutlineCSS:function(a){var b,c,d,e,f;for(null==a&&(a={}),b={},f=["width","height","left","top"],d=0,e=f.length;e>d;d++)c=f[d],null!=a[c]&&(b[c]=""+this.get(c)+"px");return b},width:function(a,b){return this._updateDimension(a,b)}.property(),height:function(a,b){return this._updateDimension(a,b)}.property(),_updateDimension:function(a,b){var c;return null!=b&&(b=Math.floor(b),b!==(c=this.get(a))&&this.set("dimensionsDidChange",!0)),b},_presetContainerAttrs:function(a){var b;return null==a&&(a={}),null!=a.width&&null!=a.height||(b=this.$container(),null==a.width&&this.set("width",b.width()),null!=a.height)?void 0:this.set("height",b.height())}})}.call(this),function(){Visualizer.ModuleView.ResizableMixin=Ember.Mixin.create({run:function(a,b){return null==b&&(b={}),this._updateSize(b),this._super(a,b)},_updateSize:function(a){var b,c,d,e,f;for(null==a&&(a={}),this.get("visualizer.world").resize(),e=[{key:"width"},{key:"height"},{key:"left",req:"width"},{key:"top",req:"height"}],f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(this._tryUpdateValue(b.key,a[b.key],a,b.req));return f},_tryUpdateValue:function(a,b,c,d){var e,f;return null==c&&(c={}),null==d&&(d=a),null!=b&&(null!=c.padding&&(f=Visualizer.Utils.relativeSizeString(c.padding,this.get("visualizer.world."+d))),f=null!=f?f:15,e=Math.floor(Visualizer.Utils.relativeSizeString(b,this.get("visualizer.world."+d))-f),isFinite(e)&&this.get(a)!==e)?(this.set(a,e),!0):!1}})}.call(this); \ No newline at end of file diff --git a/build/js/j-visualizer.js b/build/js/j-visualizer.js index 130c55e..6c7c170 100644 --- a/build/js/j-visualizer.js +++ b/build/js/j-visualizer.js @@ -1870,7 +1870,7 @@ */ hardReset: (function() { this.set('dimensionsDidChange', true); - return this.run('clear'); + return this.get('module').requestRedraw(); }).observes('data'), /** diff --git a/documentation/files/build_js_j-visualizer.js.html b/documentation/files/build_js_j-visualizer.js.html index 92dbc15..77ddca8 100644 --- a/documentation/files/build_js_j-visualizer.js.html +++ b/documentation/files/build_js_j-visualizer.js.html @@ -1978,7 +1978,7 @@

      File: build/js/j-visualizer.js

      */ hardReset: (function() { this.set('dimensionsDidChange', true); - return this.run('clear'); + return this.get('module').requestRedraw(); }).observes('data'), /** diff --git a/spec/module_views/module_views_spec.js b/spec/module_views/module_views_spec.js index beb90df..27f1ae0 100644 --- a/spec/module_views/module_views_spec.js +++ b/spec/module_views/module_views_spec.js @@ -99,7 +99,6 @@ test('dimensionsDidChange , hardReset', function() { ok(!_testModuleView.get('testCleared'), "Clear function not yet triggered."); _testModuleView.hardReset(); equal(_testModuleView.get('dimensionsDidChange'), true, "hardReset caused dimensionsDidChange to flip to true"); - ok(_testModuleView.get('testCleared'), "hardReset triggered clear function."); }); @@ -202,4 +201,4 @@ test('run (WITH explicit size dimensions)', function() { var cssAttrs = _testModuleView.widgetParamedOutlineCSS(testParams); equal(cssAttrs.width, _testModuleView.get('width')+"px", "widgetParamedOutlineCSS has width with 'px' suffix"); equal(cssAttrs.height, _testModuleView.get('height')+"px", "widgetParamedOutlineCSS has height with 'px' suffix"); -}); \ No newline at end of file +}); diff --git a/src/module_views/_module_view.js.coffee b/src/module_views/_module_view.js.coffee index 6713e5a..dc488c2 100644 --- a/src/module_views/_module_view.js.coffee +++ b/src/module_views/_module_view.js.coffee @@ -202,7 +202,7 @@ ### hardReset: (()-> @set('dimensionsDidChange', true) # Because the data itself is sort of a dimension, too... - @run('clear') + @get('module').requestRedraw() ).observes('data') ###* From 30396831fee202cb2a538ee6ca3c2463dfee4556 Mon Sep 17 00:00:00 2001 From: Dylan Robinson Date: Mon, 12 May 2014 13:43:56 -0400 Subject: [PATCH 7/7] Rename the spec bower for clarity --- spec/bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/bower.json b/spec/bower.json index 1ea1f4c..25193c1 100644 --- a/spec/bower.json +++ b/spec/bower.json @@ -1,5 +1,5 @@ { - "name": "j-visualizer", + "name": "j-visualizer-spec", "dependencies": { "ember-runtime": "http://builds.emberjs.com.s3.amazonaws.com/beta/daily/20130909/ember-runtime.js", "jquery": "> 2.0",