Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure CSS is applied before positioning graphie labels

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D118
  • Loading branch information...
commit 805fee66770c4bed970a7a11e5666ae294807959 1 parent 97bf55b
@beneater beneater authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 utils/graphie.js
View
12 utils/graphie.js
@@ -259,23 +259,23 @@
if (latex) {
var code = $("<code>").text(text);
span = $("<span>").append(code);
- // Add to the MathJax queue
- if (typeof MathJax !== "undefined") {
- $.tmpl.type.code()(code[0]);
- }
} else {
span = $("<span>").html(text);
}
var pad = currentStyle["label-distance"];
- span.css({
+ span.css($.extend({}, currentStyle, {
position: "absolute",
left: scaled[0],
top: scaled[1],
padding: (pad != null ? pad : 7) + "px"
- }).appendTo(el);
+ })).appendTo(el);
if (typeof MathJax !== "undefined") {
+ // Add to the MathJax queue
+ if (latex) {
+ $.tmpl.type.code()(code[0]);
+ }
// Run after MathJax typesetting
MathJax.Hub.Queue(function() {
// Avoid an icky flash
Please sign in to comment.
Something went wrong with that request. Please try again.