mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-12-19 21:07:03 +01:00
Fixed frontend properties and updated MochiKit version
This commit is contained in:
@@ -8,7 +8,7 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
|
||||
|
||||
***/
|
||||
|
||||
MochiKit.Base._module('Visual', '1.5', ['Base', 'DOM', 'Style', 'Color', 'Position']);
|
||||
MochiKit.Base.module(MochiKit, 'Visual', '1.5', ['Base', 'DOM', 'Style', 'Color', 'Position']);
|
||||
|
||||
MochiKit.Visual._RoundCorners = function (e, options) {
|
||||
e = MochiKit.DOM.getElement(e);
|
||||
@@ -469,6 +469,11 @@ MochiKit.Visual.Transitions.parabolic = function (pos) {
|
||||
return pos * pos;
|
||||
};
|
||||
|
||||
/** @id MochiKit.Visual.Transitions.spring */
|
||||
MochiKit.Visual.Transitions.spring = function (pos) {
|
||||
return 1 - (Math.cos(pos * 2.5 * Math.PI) * Math.exp(-pos * 6));
|
||||
};
|
||||
|
||||
/** @id MochiKit.Visual.Transitions.none */
|
||||
MochiKit.Visual.Transitions.none = function (pos) {
|
||||
return 0;
|
||||
@@ -534,6 +539,11 @@ MochiKit.Base.update(MochiKit.Visual.ScopedQueue.prototype, {
|
||||
e.finalize();
|
||||
}, this.effects);
|
||||
break;
|
||||
case 'replace':
|
||||
ma(function (e) {
|
||||
e.cancel();
|
||||
}, this.effects);
|
||||
break;
|
||||
}
|
||||
|
||||
effect.startOn += timestamp;
|
||||
@@ -662,8 +672,12 @@ MochiKit.Visual.Base.prototype = {
|
||||
this.event('afterSetup');
|
||||
}
|
||||
if (this.state == 'running') {
|
||||
if (this.options.transition) {
|
||||
pos = this.options.transition(pos);
|
||||
var trans = this.options.transition;
|
||||
if (typeof(trans) == "string") {
|
||||
trans = MochiKit.Visual.Transitions[trans];
|
||||
}
|
||||
if (typeof(trans) == "function") {
|
||||
pos = trans(pos);
|
||||
}
|
||||
pos *= (this.options.to - this.options.from);
|
||||
pos += this.options.from;
|
||||
@@ -1686,8 +1700,8 @@ MochiKit.Visual.squish = function (element, /* optional */ options) {
|
||||
var elemClip;
|
||||
options = b.update({
|
||||
restoreAfterFinish: true,
|
||||
scaleMode: {originalHeight: elementDimensions.w,
|
||||
originalWidth: elementDimensions.h},
|
||||
scaleMode: {originalHeight: elementDimensions.h,
|
||||
originalWidth: elementDimensions.w},
|
||||
beforeSetupInternal: function (effect) {
|
||||
elemClip = s.makeClipping(effect.element);
|
||||
},
|
||||
@@ -1958,18 +1972,5 @@ MochiKit.Visual.fold = function (element, /* optional */ options) {
|
||||
};
|
||||
|
||||
|
||||
/* end of Rico adaptation */
|
||||
|
||||
MochiKit.Visual.__new__ = function () {
|
||||
var m = MochiKit.Base;
|
||||
|
||||
// Backwards compatibility aliases
|
||||
m._deprecated(this, 'Color', 'MochiKit.Color.Color', '1.1');
|
||||
m._deprecated(this, 'getElementsComputedStyle', 'MochiKit.Style.getStyle', '1.1');
|
||||
|
||||
m.nameFunctions(this);
|
||||
};
|
||||
|
||||
MochiKit.Visual.__new__();
|
||||
|
||||
MochiKit.Base.nameFunctions(MochiKit.Visual);
|
||||
MochiKit.Base._exportSymbols(this, MochiKit.Visual);
|
||||
|
||||
Reference in New Issue
Block a user