Skip to content

Commit

Permalink
Add the object border around tile objects when clicked on
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Apr 3, 2012
1 parent b37ffae commit ed9104b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@

## Editor

* FEATURE: Add ability to click on a fill object and delete it just like you can
do with tiles -- or extract this into a common place

* INTERNAL: Use editor-map-object for all objects not just tiles

* FEATURE: Add ability to set the background color of a map
Expand All @@ -46,13 +43,16 @@

* INTERNAL: Bind viewport events to viewport.$elem rather than viewport.$map

* FEATURE: Add entities layer
* FEATURE: When dragging a map object (tile or fill), instantly put its z-index
above the others (or just move it after every one)

* FEATURE: Add ability to add a new map. To do this, double-click on "Add new
map" in the sidebar. A modal will appear with textboxes for the desired
dimensions of the map, and when the modal is submitted a new canvas is created
and loaded into the viewport.

* FEATURE: Add entities layer

#---

* NICE-TO-HAVE: Snap the selection box to the nearest grid guide, but not by
Expand Down
4 changes: 2 additions & 2 deletions app/javascripts/editor/viewport.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ define 'editor.viewport', ->
@_addEventsToMapObjects $(mapObjectsSel)

# TODO: This is the same as fill
@$map.bind "mouseup.#{evtns}", (evt) =>
@$map.bind "mousedown.#{evtns}", (evt) =>
console.log "#{evtns}: mouseup"
@$map.find('.editor-map-object')
.removeClass('editor-selected')
Expand Down Expand Up @@ -541,7 +541,7 @@ define 'editor.viewport', ->
# TODO: This is the same as _addEventsToSelectionBoxes()
_addEventsToMapObjects: ($draggees) ->
evtns = 'editor.viewport.layer-tiles.tool-normal'
$draggees.bind "mouseupnodrag.#{evtns}", (evt) ->
$draggees.bind "mousedown.#{evtns}", (evt) ->
console.log "#{evtns}: map object mouseupnodrag"
$draggee = $(this)
state = $draggee.attr('data-is-selected')
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/app/editor/viewport.js

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

0 comments on commit ed9104b

Please sign in to comment.