Skip to content

Commit

Permalink
fixing a syntax error; picking up latest changes to -core
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Apr 22, 2009
1 parent 3b9f575 commit b653451
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Source/Element/Element.Position.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Element.implement({

position: function(options){
//call setPosition if the options are x/y values
if (options && ($defined(options.x) || $defined(options.y))) return this.setPosition.apply(this, arguments) : this;
if (options && ($defined(options.x) || $defined(options.y))) return this.setPosition.apply(this, arguments);
$each(options||{}, function(v, k){ if (!$defined(v)) delete options[k]; });
options = $merge({
relativeTo: document.body,
Expand Down
2 changes: 1 addition & 1 deletion assets/mootools-core/Source/Class/Class.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ new Native({name: 'Class', initialize: Class}).extend({
},

wrap: function(self, key, method){
method = method._origin || method;
if (method._origin) method = method._origin;

return function(){
if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.');
Expand Down
2 changes: 1 addition & 1 deletion assets/mootools-core/Source/Core/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Inspiration:
*/

var MooTools = {
'version': '1.2.1',
'version': '1.2.2',
'build': '%build%'
};

Expand Down
11 changes: 7 additions & 4 deletions assets/mootools-core/Source/Element/Element.Dimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ Element.implement({
return null;
},

getOffsets: function(){
getOffsets: function(){
if (Browser.Engine.trident){
var bound = this.getBoundingClientRect(), html = this.getDocument().documentElement;
var isFixed = styleString(this, 'position') == 'fixed';
return {
x: bound.left + html.scrollLeft - html.clientLeft,
y: bound.top + html.scrollTop - html.clientTop
x: bound.left + ((isFixed) ? 0 : html.scrollLeft) - html.clientLeft,
y: bound.top + ((isFixed) ? 0 : html.scrollTop) - html.clientTop
};
}

Expand Down Expand Up @@ -120,7 +121,7 @@ Element.implement({
return {left: obj.x - styleNumber(this, 'margin-left'), top: obj.y - styleNumber(this, 'margin-top')};
},

position: function(obj){
setPosition: function(obj){
return this.setStyles(this.computePosition(obj));
}

Expand Down Expand Up @@ -191,6 +192,8 @@ function getCompatElement(element){

//aliases

Element.alias('position', 'setPosition'); //compatability

Native.implement([Window, Document, Element], {

getHeight: function(){
Expand Down
1 change: 0 additions & 1 deletion assets/mootools-core/Source/Fx/Fx.Morph.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Fx.Morph = new Class({
Extends: Fx.CSS,

initialize: function(element, options){
dbug.log('new MORPH! ', element)
this.element = this.subject = $(element);
this.parent(options);
},
Expand Down

0 comments on commit b653451

Please sign in to comment.