Skip to content

Commit

Permalink
Wrap all elements in containing <div>
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonidas-from-XIV committed Sep 15, 2011
1 parent c95f11c commit c5805c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/jquery.floatinghands.coffee
Expand Up @@ -93,8 +93,7 @@
border: 'none'
outline: 'none'
cursor: 'pointer'
# TODO: create a wrapping div or something
$(stage.canvas).before button
$(stage.canvas).after button

objectOnPoint = (hotspots, x, y) ->
for key, obj of hotspots
Expand Down Expand Up @@ -175,8 +174,10 @@
# we set the attribute on the element and not using jquery, because
# it needs to be an attribute and not CSS
canvas = $('<canvas>').attr width: candidate.width(), height: candidate.height()
(canvas.attr id: originalId) if originalId = candidate.attr 'id'
candidate.replaceWith canvas
div = $ '<div>'
(div.attr id: originalId) if originalId = candidate.attr 'id'
div.append canvas
candidate.replaceWith div
widget = canvas[0]

# if Explorer Canvas was loaded, run it on our newly created element
Expand Down

0 comments on commit c5805c1

Please sign in to comment.