New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TangleKit Adjustable Number help attribute #4

Open
wants to merge 6 commits into
base: master
from

TangleKit: TKIf and TKSwitch work both both inline and block elements…

… (thanks Mert Torun)
  • Loading branch information...
worrydream authored and edgerunner committed Nov 24, 2011
commit aa671d3a9e3fd0440cfc68cf5732ee19b0b121eb
View
@@ -26,7 +26,8 @@ Tangle.classes.TKIf = {
update: function (element, value) {
if (this.isInverted) { value = !value; }
element.style.display = !value ? "none" : "inline"; // todo, block or inline?
if (value) { element.style.removeProperty("display"); }
else { element.style.display = "none" };
}
};
@@ -43,7 +44,8 @@ Tangle.classes.TKSwitch = {
update: function (element, value) {
element.getChildren().each( function (child, index) {
child.style.display = (index != value) ? "none" : "inline";
if (index != value) { child.style.display = "none"; }
else { child.style.removeProperty("display"); }
});
}
};
ProTip! Use n and p to navigate between commits in a pull request.