Skip to content

Commit

Permalink
Update hybicon.core
Browse files Browse the repository at this point in the history
  • Loading branch information
softwaretailoring committed Dec 6, 2015
1 parent c21dd67 commit 3816e2f
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 313 deletions.
Binary file removed css/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
288 changes: 0 additions & 288 deletions css/fonts/glyphicons-halflings-regular.svg

This file was deleted.

Binary file removed css/fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file removed css/fonts/glyphicons-halflings-regular.woff
Binary file not shown.
Binary file removed css/fonts/glyphicons-halflings-regular.woff2
Binary file not shown.
2 changes: 0 additions & 2 deletions js/for-doc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ var setDetails = function (mode) {
case "info":
details = "When you want to show more. Psst... There is a <a href='github.html'>GitHub plugin</a>";
break;
default:

}

document.getElementById("details").innerHTML = details;
Expand Down
2 changes: 1 addition & 1 deletion js/for-doc/index.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions js/hybicon.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ hybicon.prototype.createIcon = function () {
if (thishybicon.hovered !== true &&
thishybicon.clicked !== true) {
thishybicon.hovered = true;
thishybicon.hoverHandler(true);
thishybicon.animateIcon(true);
}
});
this.iconHolder.mouseout(function () {
if (thishybicon.clicked !== true) {
thishybicon.hovered = false;
thishybicon.hoverHandler(false);
thishybicon.animateIcon(false);
}
});
}
Expand All @@ -281,19 +281,19 @@ hybicon.prototype.createIcon = function () {
this.iconHolder.click(function () {
if (thishybicon.clicked !== true) {
thishybicon.clicked = true;
thishybicon.hoverHandler(true);
thishybicon.animateIcon(true);
}
else {
thishybicon.clicked = false;
thishybicon.hoverHandler(false);
thishybicon.animateIcon(false);
}
});
}

return this;
};

hybicon.prototype.hoverHandler = function (hovered) {
hybicon.prototype.animateIcon = function (hovered) {
if (hovered === true) {
this.icon1.animate({ path: this.icon1PathAnim, transform: this.icon1TransformAnim }, this.animateTime, this.animateEasing);
if (this.icon2PathAnim !== null) {
Expand All @@ -308,7 +308,7 @@ hybicon.prototype.hoverHandler = function (hovered) {
}
};

//Parse html5 data- attributes, the onmouseup event and anchor link
//Parse html5 data- attributes
hybicon.prototype.parseIcon = function () {
if (this.holderDiv !== undefined &&
this.holderDiv !== null) {
Expand Down Expand Up @@ -355,6 +355,11 @@ hybicon.prototype.parseIcon = function () {
iconClass.setpresets(this, hybiconData);
}
}
else {
this.icon1Path = "M0,0L100,100M100,0L0,100";
this.icon1Stroke = "#222";
this.icon1StrokeWidth = 2;
}

//data-hybicon-size
var hybiconSize = this.holderDiv.getAttribute("data-hybicon-size");
Expand Down Expand Up @@ -500,7 +505,6 @@ hybicon.prototype.parseAll = function () {
}
hybicons[i].id = hybiconid;
}

new hybicon(hybiconid);
}
};
Expand Down Expand Up @@ -633,7 +637,7 @@ hybicon.prototype.setDefaultProps = function () {
this.icon2YAnim = sizeTransform2Anim.iconY;
}

// Animation
// animation
if (this.animateTime === null) {
if (this.hoverMode === "rotate") { this.animateTime = 400; }
else { this.animateTime = 200; }
Expand Down
Loading

0 comments on commit 3816e2f

Please sign in to comment.