Skip to content

Commit

Permalink
A little bit of cleanup. Including removing the Vert dimension.
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph committed Feb 9, 2012
1 parent 83cf064 commit 1b5c86f
Show file tree
Hide file tree
Showing 30 changed files with 21 additions and 136 deletions.
5 changes: 4 additions & 1 deletion src/compat/browser.js
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
Monocle.Browser = {} Monocle.Browser = {};


// Compare the user-agent string to a string or regex pattern. // Compare the user-agent string to a string or regex pattern.
// //
Expand All @@ -20,6 +20,8 @@ Monocle.Browser.is = {
} }




// Set the browser engine string.
//
if (Monocle.Browser.is.IE) { if (Monocle.Browser.is.IE) {
Monocle.Browser.engine = "IE"; Monocle.Browser.engine = "IE";
} else if (Monocle.Browser.is.Opera) { } else if (Monocle.Browser.is.Opera) {
Expand All @@ -29,6 +31,7 @@ if (Monocle.Browser.is.IE) {
} else if (Monocle.Browser.is.Gecko) { } else if (Monocle.Browser.is.Gecko) {
Monocle.Browser.engine = "Gecko"; Monocle.Browser.engine = "Gecko";
} else { } else {
console.warn("Unknown engine; assuming W3C compliant.");
Monocle.Browser.engine = "W3C"; Monocle.Browser.engine = "W3C";
} }


Expand Down
2 changes: 2 additions & 0 deletions src/compat/css.js
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,5 @@
// A class for manipulating CSS properties in a browser-engine-aware way.
//
Monocle.CSS = function () { Monocle.CSS = function () {


var API = { constructor: Monocle.CSS } var API = { constructor: Monocle.CSS }
Expand Down
3 changes: 3 additions & 0 deletions src/compat/env.js
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,6 @@
// A class that tests the browser environment for required capabilities and
// known bugs (for which we have workarounds).
//
Monocle.Env = function () { Monocle.Env = function () {


var API = { constructor: Monocle.Env } var API = { constructor: Monocle.Env }
Expand Down
9 changes: 9 additions & 0 deletions src/compat/stubs.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ window.console.compatDir = function (obj) {


window.console.log(stringify(obj)); window.console.log(stringify(obj));
} }


// A convenient alias for setTimeout that assumes 0 if no timeout is specified.
//
Monocle.defer = function (fn, time) {
if (fn && typeof fn == "function") {
return setTimeout(fn, time || 0);
}
}
3 changes: 0 additions & 3 deletions src/controls/contents.js
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,4 @@
Monocle.Controls.Contents = function (reader) { Monocle.Controls.Contents = function (reader) {
if (Monocle.Controls == this) {
return new Monocle.Controls.Contents(reader);
}


var API = { constructor: Monocle.Controls.Contents } var API = { constructor: Monocle.Controls.Contents }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
4 changes: 0 additions & 4 deletions src/controls/magnifier.js
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,5 @@
Monocle.Controls.Magnifier = function (reader) { Monocle.Controls.Magnifier = function (reader) {
if (Monocle.Controls == this) {
return new Monocle.Controls.Magnifier(reader);
}


// Public methods and properties.
var API = { constructor: Monocle.Controls.Magnifier } var API = { constructor: Monocle.Controls.Magnifier }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
var p = API.properties = { var p = API.properties = {
Expand Down
3 changes: 0 additions & 3 deletions src/controls/placesaver.js
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,4 @@
Monocle.Controls.PlaceSaver = function (bookId) { Monocle.Controls.PlaceSaver = function (bookId) {
if (Monocle.Controls == this) {
return new Monocle.Controls.PlaceSaver(bookId);
}


var API = { constructor: Monocle.Controls.PlaceSaver } var API = { constructor: Monocle.Controls.PlaceSaver }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
3 changes: 0 additions & 3 deletions src/controls/scrubber.js
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,4 @@
Monocle.Controls.Scrubber = function (reader) { Monocle.Controls.Scrubber = function (reader) {
if (Monocle.Controls == this) {
return new Monocle.Controls.Scrubber(reader);
}


var API = { constructor: Monocle.Controls.Scrubber } var API = { constructor: Monocle.Controls.Scrubber }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
3 changes: 0 additions & 3 deletions src/controls/spinner.js
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,4 @@
Monocle.Controls.Spinner = function (reader) { Monocle.Controls.Spinner = function (reader) {
if (Monocle.Controls == this) {
return new Monocle.Controls.Spinner(reader);
}


var API = { constructor: Monocle.Controls.Spinner } var API = { constructor: Monocle.Controls.Spinner }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
2 changes: 0 additions & 2 deletions src/controls/stencil.js
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,5 @@
Monocle.Controls.Stencil = function (reader) { Monocle.Controls.Stencil = function (reader) {


if (Monocle.Controls == this) { return new this.Stencil(reader); }

var API = { constructor: Monocle.Controls.Stencil } var API = { constructor: Monocle.Controls.Stencil }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
var p = API.properties = { var p = API.properties = {
Expand Down
1 change: 0 additions & 1 deletion src/core/book.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* *
*/ */
Monocle.Book = function (dataSource) { Monocle.Book = function (dataSource) {
if (Monocle == this) { return new Monocle.Book(dataSource); }


var API = { constructor: Monocle.Book } var API = { constructor: Monocle.Book }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
2 changes: 1 addition & 1 deletion src/core/events.js
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
Monocle.Events = {} Monocle.Events = {};




// Fire a custom event on a given target element. The attached data object will // Fire a custom event on a given target element. The attached data object will
Expand Down
9 changes: 1 addition & 8 deletions src/core/monocle.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ Monocle = {
}; };




Monocle.defer = function (fn, time) { Monocle.Dimensions = {};
if (fn && typeof fn == "function") {
return setTimeout(fn, time || 0);
}
}


Monocle.Dimensions = {}
Monocle.Controls = {}; Monocle.Controls = {};
Monocle.Flippers = {}; Monocle.Flippers = {};
Monocle.Panels = {}; Monocle.Panels = {};
3 changes: 0 additions & 3 deletions src/core/reader.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
// systemId: the id for root elements of components, defaults to "RS:monocle" // systemId: the id for root elements of components, defaults to "RS:monocle"
// //
Monocle.Reader = function (node, bookData, options, onLoadCallback) { Monocle.Reader = function (node, bookData, options, onLoadCallback) {
if (Monocle == this) {
return new Monocle.Reader(node, bookData, options, onLoadCallback);
}


var API = { constructor: Monocle.Reader } var API = { constructor: Monocle.Reader }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
1 change: 1 addition & 0 deletions src/core/styles.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Monocle.Styles = {
// //
Monocle.Styles.container = { Monocle.Styles.container = {
"position": "absolute", "position": "absolute",
"overflow": "hidden",
"top": "0", "top": "0",
"left": "0", "left": "0",
"bottom": "0", "bottom": "0",
Expand Down
87 changes: 0 additions & 87 deletions src/dimensions/vert.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/flippers/slider.js
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,4 @@
Monocle.Flippers.Slider = function (reader) { Monocle.Flippers.Slider = function (reader) {
if (Monocle.Flippers == this) {
return new Monocle.Flippers.Slider(reader);
}


var API = { constructor: Monocle.Flippers.Slider } var API = { constructor: Monocle.Flippers.Slider }
var k = API.constants = API.constructor; var k = API.constants = API.constructor;
Expand Down
1 change: 0 additions & 1 deletion test/bookdata/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
#part1, #part2 { #part1, #part2 {
display: none; display: none;
Expand Down
1 change: 0 additions & 1 deletion test/componentry/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }


#hiddenFrames { #hiddenFrames {
Expand Down
1 change: 0 additions & 1 deletion test/controls/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
#part1, #part2 { #part1, #part2 {
display: none; display: none;
Expand Down
2 changes: 0 additions & 2 deletions test/dogfood/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
margin: 2em 0; margin: 2em 0;
float: left;
} }
#theCode { #theCode {
clear: both; clear: both;
Expand Down
1 change: 0 additions & 1 deletion test/dogfood/simplest.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
width: 300px; width: 300px;
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
overflow: hidden;
} }
</style> </style>


Expand Down
1 change: 0 additions & 1 deletion test/events/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
#out { #out {
font: 9pt Consolas, Inconsolata, Menlo, Andale Mono, Monaco, monospace; font: 9pt Consolas, Inconsolata, Menlo, Andale Mono, Monaco, monospace;
Expand Down
1 change: 0 additions & 1 deletion test/flippers/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
#part1, #part2 { #part1, #part2 {
display: none; display: none;
Expand Down
1 change: 0 additions & 1 deletion test/locus-search/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
</style> </style>


Expand Down
1 change: 0 additions & 1 deletion test/panels/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
#part1, #part2 { #part1, #part2 {
display: none; display: none;
Expand Down
1 change: 0 additions & 1 deletion test/rich_content/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
height: 420px; height: 420px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
</style> </style>


Expand Down
1 change: 0 additions & 1 deletion test/showcase/01-velveteen/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
height: 420px; height: 420px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
</style> </style>


Expand Down
1 change: 0 additions & 1 deletion test/stencil/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
height: 400px; height: 400px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
</style> </style>


Expand Down
1 change: 0 additions & 1 deletion test/stylesheet/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
height: 420px; height: 420px;
border: 1px solid #000; border: 1px solid #000;
background-color: #CCC; background-color: #CCC;
overflow: hidden;
} }
</style> </style>


Expand Down

0 comments on commit 1b5c86f

Please sign in to comment.