Skip to content

Commit

Permalink
TAU 1.1.12 release
Browse files Browse the repository at this point in the history
Dedicated platform: Tizen 5.5

New features in 1.1:
- new widgets: Graph, Dimmer
- Keyboard support
- TV landscape layout

Changes in version 1.1.12:
a122326 Lint: Fixes for issues reported by EsLint
92b5dc1 Set getDividers to proper values
396110d TextInput: make clear button working for DE
f5e3cb2 Lint: Fixes for issues reported by EsLint
14371ab Fix missing images issue for code.tizen.org
814cdd7 Marquee: fix for wrong marquee position after reset

Signed-off-by: Lukasz Slachciak <l.slachciak@samsung.com>
  • Loading branch information
lmslachciak committed Dec 4, 2019
1 parent fa059c0 commit 58f4c9f
Show file tree
Hide file tree
Showing 10 changed files with 338 additions and 83 deletions.
2 changes: 1 addition & 1 deletion dist/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.11
1.1.12
142 changes: 124 additions & 18 deletions dist/mobile/js/tau.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var ns = window.tau = window.tau || {},
nsConfig = window.tauConfig = window.tauConfig || {};
nsConfig.rootNamespace = 'tau';
nsConfig.fileName = 'tau';
ns.version = '1.1.11';
ns.version = '1.1.12';
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd
*
Expand Down Expand Up @@ -866,6 +866,39 @@ ns.version = '1.1.11';
window.clearTimeout(currentFrame);
};

/**
* Remove animation callbacks added by requestAnimationFrame
* @method cancelAnimationFrames
* @static
* @member ns.util
* @param {*} animationId value for identify animation in queue
*/
util.cancelAnimationFrames = function (animationId) {
var found = 0,
len = waitingFrames.length,
i = 0;

if (animationId) {
// remove selected requests
while (len > 0 && found > -1) {
found = -1;
for (; i < len; i++) {
if (waitingFrames[i].animationId === animationId) {
found = i;
break;
}
}

if (found > -1) {
waitingFrames.splice(found, 1);
len--;
}
}
} else {
ns.warn("cancelAnimationFrames() require one parameter for request identify");
}
};

util._getCancelAnimationFrame = function () {
return (window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
Expand Down Expand Up @@ -6492,8 +6525,7 @@ ns.version = '1.1.11';
prototype._render = function (now) {
var self = this,
stateDOM = self._stateDOM,
element = self.element,
animation = self._animation;
element = self.element;

if (now === true) {
render(stateDOM, element, false);
Expand Down Expand Up @@ -36031,6 +36063,39 @@ function pathToRegexp (path, keys, options) {
window.clearTimeout(currentFrame);
};

/**
* Remove animation callbacks added by requestAnimationFrame
* @method cancelAnimationFrames
* @static
* @member ns.util
* @param {*} animationId value for identify animation in queue
*/
util.cancelAnimationFrames = function (animationId) {
var found = 0,
len = waitingFrames.length,
i = 0;

if (animationId) {
// remove selected requests
while (len > 0 && found > -1) {
found = -1;
for (; i < len; i++) {
if (waitingFrames[i].animationId === animationId) {
found = i;
break;
}
}

if (found > -1) {
waitingFrames.splice(found, 1);
len--;
}
}
} else {
ns.warn("cancelAnimationFrames() require one parameter for request identify");
}
};

util._getCancelAnimationFrame = function () {
return (window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
Expand Down Expand Up @@ -36817,6 +36882,8 @@ function pathToRegexp (path, keys, options) {
} else {
self._animationTimeout = self._calculateAnimate.bind(self, callback);
}
self._animationId = Math.random() + Date.now();
self._animationTimeout.animationId = self._animationId;
self._calculateAnimate(callback);
return self;
};
Expand All @@ -36832,7 +36899,9 @@ function pathToRegexp (path, keys, options) {
self._animate.chainIndex = 0;
// reset current animation config
self._animateConfig = null;
// clear timeout

ns.util.cancelAnimationFrames(self._animationId);
// clear timeout
self._animationTimeout = null;
return self;
};
Expand All @@ -36847,11 +36916,51 @@ function pathToRegexp (path, keys, options) {
}
};

/**
* Method resets startTime for each animations to current time
* @private
* @param {*} animateConfig
*/
function resetStartTimeForAnimateConfig(animateConfig) {
var i,
len;

if (animateConfig) {
len = animateConfig.length;
for (i = 0; i < len; i++) {
animateConfig[i].startTime = Date.now();
}
}
}

/**
* Reset animations to initial position
*/
prototype.reset = function () {
var self = this,
restart = self.active;

if (restart) {
self.stop();
}

self._initAnimate();
resetStartTimeForAnimateConfig(self._animateConfig);
self._pausedTimeDiff = 0;
self._animate.chainIndex = 0;

self._calculateAnimate();

if (restart) {
self.start();
}
}

function calculateOption(option, time) {
var timeDiff,
current = null;

if (option && option.startTime < time) {
if (option && option.startTime <= time) {
// if option is not delayed
timeDiff = time - option.startTime;

Expand Down Expand Up @@ -36938,7 +37047,7 @@ function pathToRegexp (path, keys, options) {
self._tickFunction(self._object);
}
if (notFinishedAnimationsCount) {
// setting next loop state
// setting next loop state
if (self._animationTimeout) {
requestAnimationFrame(self._animationTimeout);
}
Expand Down Expand Up @@ -37303,6 +37412,8 @@ function pathToRegexp (path, keys, options) {
prototype._build = function (element) {
var marqueeInnerElement = element.querySelector("." + classes.MARQUEE_CONTENT);

element.classList.add(CLASSES_PREFIX);

if (!marqueeInnerElement) {
marqueeInnerElement = document.createElement("div");

Expand Down Expand Up @@ -37531,7 +37642,6 @@ function pathToRegexp (path, keys, options) {
self._animation.stop();
self._animation.destroy();
self._animation = null;
self.element.classList.remove(classes.MARQUEE_GRADIENT);
self.element.style.webkitMaskImage = "";

marqueeInnerElement = self.element.querySelector("." + classes.MARQUEE_CONTENT);
Expand Down Expand Up @@ -37583,10 +37693,6 @@ function pathToRegexp (path, keys, options) {
* @member ns.widget.core.Marquee
*/
prototype.stop = function () {
var self = this,
animation = self._animation;

animation.pause();
this.option("animation", "stopped");
};

Expand All @@ -37608,12 +37714,12 @@ function pathToRegexp (path, keys, options) {
*/
prototype.reset = function () {
var self = this,
stateDOM = self._stateDOM;
animation = self._animation;

this.option("animation", "stopped");
stateDOM.style.webkitMaskImage = (this.options.ellipsisEffect === "none") ? "" : GRADIENTS.RIGHT;
stateDOM.children[0].style.webkitTransform = "translateX(0)";
self._render(true);
animation.reset();

self.element.style.webkitMaskImage = (self.options.ellipsisEffect === "none") ?
"" : GRADIENTS.RIGHT;
};

Marquee.prototype = prototype;
Expand Down Expand Up @@ -39411,7 +39517,7 @@ function pathToRegexp (path, keys, options) {
utilEvent.on(element, "focus", onFocusCallback);
utilEvent.on(element, "blur", onBlurCallback);
if (clearBtn) {
utilEvent.on(clearBtn, "click", onClearBtnClickCallback);
utilEvent.on(clearBtn, "mousedown", onClearBtnClickCallback);
utilEvent.on(clearBtn, eventName.ANIMATIONEND, onClearBtnAnimationEndCallback);
}

Expand All @@ -39432,7 +39538,7 @@ function pathToRegexp (path, keys, options) {
utilEvent.off(element, "focus", callbacks.onFocusCallback);
utilEvent.off(element, "blur", callbacks.onBlurCallback);
if (clearBtn) {
utilEvent.off(clearBtn, "click", callbacks.onClearBtnClickCallback);
utilEvent.off(clearBtn, "mousedown", callbacks.onClearBtnClickCallback);
utilEvent.off(clearBtn, eventName.ANIMATIONEND, callbacks.onClearBtnAnimationEndCallback);
}
};
Expand Down
26 changes: 13 additions & 13 deletions dist/mobile/js/tau.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mobile/js/tau.support-2.3.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var ns = window.tau = window.tau || {},
nsConfig = window.tauConfig = window.tauConfig || {};
nsConfig.rootNamespace = 'tau';
nsConfig.fileName = 'tau';
ns.version = '1.1.11';
ns.version = '1.1.12';
/*global window, ns, define */
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd
Expand Down
2 changes: 1 addition & 1 deletion dist/mobile/js/tau.support-2.3.min.js

Large diffs are not rendered by default.

42 changes: 37 additions & 5 deletions dist/tv/js/tau.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var ns = window.tau = window.tau || {},
nsConfig = window.tauConfig = window.tauConfig || {};
nsConfig.rootNamespace = 'tau';
nsConfig.fileName = 'tau';
ns.version = '1.1.11';
ns.version = '1.1.12';
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd
*
Expand Down Expand Up @@ -867,6 +867,39 @@ ns.version = '1.1.11';
window.clearTimeout(currentFrame);
};

/**
* Remove animation callbacks added by requestAnimationFrame
* @method cancelAnimationFrames
* @static
* @member ns.util
* @param {*} animationId value for identify animation in queue
*/
util.cancelAnimationFrames = function (animationId) {
var found = 0,
len = waitingFrames.length,
i = 0;

if (animationId) {
// remove selected requests
while (len > 0 && found > -1) {
found = -1;
for (; i < len; i++) {
if (waitingFrames[i].animationId === animationId) {
found = i;
break;
}
}

if (found > -1) {
waitingFrames.splice(found, 1);
len--;
}
}
} else {
ns.warn("cancelAnimationFrames() require one parameter for request identify");
}
};

util._getCancelAnimationFrame = function () {
return (window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
Expand Down Expand Up @@ -6493,8 +6526,7 @@ ns.version = '1.1.11';
prototype._render = function (now) {
var self = this,
stateDOM = self._stateDOM,
element = self.element,
animation = self._animation;
element = self.element;

if (now === true) {
render(stateDOM, element, false);
Expand Down Expand Up @@ -37509,7 +37541,7 @@ function pathToRegexp (path, keys, options) {
utilEvent.on(element, "focus", onFocusCallback);
utilEvent.on(element, "blur", onBlurCallback);
if (clearBtn) {
utilEvent.on(clearBtn, "click", onClearBtnClickCallback);
utilEvent.on(clearBtn, "mousedown", onClearBtnClickCallback);
utilEvent.on(clearBtn, eventName.ANIMATIONEND, onClearBtnAnimationEndCallback);
}

Expand All @@ -37530,7 +37562,7 @@ function pathToRegexp (path, keys, options) {
utilEvent.off(element, "focus", callbacks.onFocusCallback);
utilEvent.off(element, "blur", callbacks.onBlurCallback);
if (clearBtn) {
utilEvent.off(clearBtn, "click", callbacks.onClearBtnClickCallback);
utilEvent.off(clearBtn, "mousedown", callbacks.onClearBtnClickCallback);
utilEvent.off(clearBtn, eventName.ANIMATIONEND, callbacks.onClearBtnAnimationEndCallback);
}
};
Expand Down
26 changes: 13 additions & 13 deletions dist/tv/js/tau.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 58f4c9f

Please sign in to comment.