Skip to content

Commit

Permalink
r23932@yra (orig r614): gugod | 2008-09-19 15:47:37 +0800
Browse files Browse the repository at this point in the history
 liner.js is now completely dollor-sign free. :)
 


git-svn-id: http://code.handlino.com/svn/Liner/trunk@621 b19cb30a-9f2e-4084-8847-5e1a13269302
  • Loading branch information
gugod committed Sep 19, 2008
1 parent dfe59a5 commit ae10a47
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions lib/liner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
(function() {
var $ = jQuery;

var _id = 0;
var genId = function(prefix) {
_id++;
Expand Down Expand Up @@ -172,17 +170,18 @@
ctx.stroke();

if (this.line_label) {
$("<div></div>")
.addClass("label")
.appendTo("div#" + this.container_id )
.css({
var label_el = Liner.createElement("div", {class: "label"});
Liner.css(label_el, {
position: 'absolute',
top: '45%',
'text-align': 'center',
width: '100%',
'text-align': 'center'
})
.text(this.line_label);
});
label_el.appendChild(
document.createTextNode(this.line_label)
);
container_el.appendChild( label_el );
}

return this;
Expand All @@ -195,22 +194,6 @@
}
};

// Default Adaptors.
Liner.get = function(selector) {
var ret = [];
var matched;
if (selector.nodeType) {
ret.push(selector);
return ret;
}

if (typeof selector == "string") {
if (matched = selector.match(/^#(.+)$/))
ret.push(document.getElementById(matched[1]));
}
return ret;
};

})();


0 comments on commit ae10a47

Please sign in to comment.