forked from chemhack/jchemhub
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start removal of goog.graphics.GroupElements to make IE8 happy
- Loading branch information
Showing
7 changed files
with
124 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
goog.provide("kemia.graphics.ElementArray"); | ||
goog.require('goog.array'); | ||
goog.require("goog.debug.Logger"); | ||
|
||
/** | ||
* convenience class to contain group of goog.graphics.Elements since nested vml groups do not seem to work for IE8 in standards mode | ||
* | ||
* @constructor | ||
*/ | ||
kemia.graphics.ElementArray = function() { | ||
/** @type{Array.<goog.graphics.Element>} | ||
* @private | ||
*/ | ||
this._elements = []; | ||
} | ||
|
||
/** | ||
* Logging object. | ||
* | ||
* @type {goog.debug.Logger} | ||
* @protected | ||
*/ | ||
kemia.graphics.ElementArray.prototype.logger = goog.debug.Logger | ||
.getLogger('kemia.graphics.ElementArray'); | ||
|
||
/** | ||
* add a graphics element | ||
* @param {goog.graphics.Element} element the element to add | ||
*/ | ||
kemia.graphics.ElementArray.prototype.add = function(element) { | ||
this._elements.push(element); | ||
} | ||
|
||
/** | ||
* remove all elements | ||
*/ | ||
kemia.graphics.ElementArray.prototype.clear = function() { | ||
goog.array.forEach(this._elements, function(element){ | ||
element.getGraphics().removeElement(element); | ||
}, this); | ||
this._elements.length=0; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.