mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Correct DOM positions for village, store, perks box
I noticed a minor glitch with the Village box position in the DOM. As it is appended to the Outside panel, it can end up after the Wood gather button or after the Traps check. It depends on whether the latter exists or not. I changed it a little. Now it is "prepended" (thanks jQuery!), so it's always before any other content in the panel. It would mind e.g. for CSS consistency, as you could decide to use a style for sibling buttons and it wouldn't work unless the box is placed before or after (not between) them. For consistency with Outside box placement issue, stores are prepended to the Room panel, as first content in the DOM tree. For consistency with Outside box placement issue, perks are prepended to the Path panel, as first content in the DOM tree.
This commit is contained in:
committed by
Blake Grotewold
parent
94936f118d
commit
ebf5e6934e
+1
-1
@@ -511,7 +511,7 @@ var Room = {
|
||||
}).appendTo('div#roomPanel');
|
||||
|
||||
// Create the stores container
|
||||
$('<div>').attr('id', 'storesContainer').appendTo('div#roomPanel');
|
||||
$('<div>').attr('id', 'storesContainer').prependTo('div#roomPanel');
|
||||
|
||||
//subscribe to stateUpdates
|
||||
$.Dispatch('stateUpdate').subscribe(Room.handleStateUpdates);
|
||||
|
||||
Reference in New Issue
Block a user