Skip to content

Commit

Permalink
Cleaning up remaining TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
twolfson committed Jul 22, 2013
1 parent de3545c commit cf949ad
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/trunkata.js
Expand Up @@ -8,20 +8,13 @@ function trunkata(root, options) {

// Determine the line height of the root and current height
var lnHeight = lineHeight(root),
// https://github.com/jquery/jquery/blob/1f67d07c60c37e60052db37fc03d42af482c2d03/src/css.js#L374-L380
height = root.offsetHeight;

// TODO: Allow for `height` option (function) which skips over `line-height * lines` computation
// If the height is over the maximum height, time to optimize
var maxLines = options.lines || 1,
maxHeight = lnHeight * maxLines;
if (height > maxHeight) {
// TODO: Use a binary search module
// TODO: Find out how many words we have and treat it as a linear array
// TODO: Optimization, create a map of when each child starts in the word map so we can jump to them faster

// DEV: Poor speed run-time first
// TODO: Go to the last descedendant (all the way down the tree) of the last child, start breaking off words, if none removed there, then go up to next child
// Collect all nodes in a depth-first traversal
/*
A--\
Expand Down

0 comments on commit cf949ad

Please sign in to comment.