Commit Graph

132 Commits

Author SHA1 Message Date
probablycorey
57e7335907 Merge branch 'cj-update-markdown-preview'
Conflicts:
	src/pane.coffee
2014-02-11 11:33:46 -08:00
probablycorey
a2fcc7aa7a Add Workspace::getActiveEditor and Pane::getActiveEditor 2014-02-11 10:58:24 -08:00
probablycorey
4b529ae167 Make methods private 2014-02-11 09:33:12 -08:00
probablycorey
51fbb1be07 Add Pane::getActiveItem 2014-02-11 08:59:34 -08:00
probablycorey
af1f57048b Add Pane::getActiveItem 2014-02-11 08:55:45 -08:00
Kevin Sawicki
e5c31495cb 📝 doc parameters in pane.coffee 2014-02-06 16:55:19 -08:00
Kevin Sawicki
967db1f7b8 Remove more empty Private: comment blocks 2014-02-06 11:21:03 -08:00
Kevin Sawicki
932a792289 Remove Private: prefix 2014-02-06 10:02:53 -08:00
Kevin Sawicki
0a62277cfa 📝 doc Pane::getItems 2014-02-04 11:47:04 -08:00
Nathan Sobo
726b546004 Handle the 'split' option directly in Workspace::openSingletonSync 2014-01-21 16:44:06 -07:00
Brandon Tilley
8bba4d8add Intelligently activate new items when the active item is closed
If the active item was the pane's first item, the second item (which is
the new first item) is activated. Otherwise, the item to the left of the
closed item is activated.
2014-01-20 14:34:02 -08:00
Kevin Sawicki
e0cf20cda9 Don't throw error when saving empty pane
Closes #1440
2014-01-17 15:24:55 -08:00
Nathan Sobo
926493f05c Emit 'item-added' before setting the ::activeItem when adding first item
Fixes atom/tabs#11
2014-01-17 11:10:17 -07:00
Nathan Sobo
5e14d44d6a Destroy all pane models when workspace view is removed 2014-01-15 16:07:47 -07:00
Nathan Sobo
9af4b14716 Never allow PaneContainer::root to be null 2014-01-15 16:07:47 -07:00
Nathan Sobo
aed9f18457 Accivate the first added pane item 2014-01-15 16:07:47 -07:00
Nathan Sobo
012363a785 Null guard item in ::destroyActiveItem 2014-01-15 16:07:47 -07:00
Nathan Sobo
44331d0ba6 Fix issues splitting panes with DOM events
* ::copyActiveItem guards against not having an active item
* The Pane constructor removes undefined items from params.items
2014-01-15 16:07:47 -07:00
Nathan Sobo
fe7c5b4bc1 Only destroy an empty panes if 'core.destroyEmptyPanes' is true 2014-01-15 16:07:47 -07:00
Nathan Sobo
a8ddc530a2 Emit a pane-item-destroyed event from the workspace model
…Instead of calling itemDestroyed on the workspace view via a DOM query
2014-01-14 10:58:34 -07:00
Nathan Sobo
8e78583521 Emit 'item-destroyed' in ::removeItem when destroying flag is true 2014-01-14 10:58:34 -07:00
Nathan Sobo
a268b3e963 Rename PaneAxisModel to PaneAxis 2014-01-13 13:54:04 -07:00
Nathan Sobo
8931bf8f3a Rename PaneModel to Pane 2014-01-13 13:51:15 -07:00
Nathan Sobo
4f604ced3c Rename Pane to PaneView 2014-01-13 13:46:22 -07:00
Nathan Sobo
4179d9d268 Add deprecated Pane::removeItem 2014-01-12 17:55:29 -07:00
Nathan Sobo
b438b311f3 Rename showItem methods to activateItem
These methods set the *active* item, so the verb activate provides a
clearer correspondence. We could change the noun to "shown" item, but
that's awkward and having both active panes and active items is a nice
correspondence in terminology.
2014-01-12 17:40:57 -07:00
Nathan Sobo
561e31c0c5 Remove ::removeItemAtIndex and make ::removeItem private
Call ::destroyItem or just destroy the item directly (it should emit the
'destroyed' event)
2014-01-12 17:25:51 -07:00
Nathan Sobo
28b085be1c Rename ::makeActive to ::activate and focus panes when they're activated 2014-01-11 20:48:01 -07:00
Nathan Sobo
b21eb6f934 Drop .flexbox-repaint-hack div and use pseudo selector instead
We don't actually need structural markup to ensure that all pane views
are absolutely positioned. We can just use the `> *` selector inside of
.pane-items.

/cc @probablycorey is there anything I'm missing here?
2014-01-11 19:13:00 -07:00
Nathan Sobo
3ab7836ab2 Upgrade to emissary 0.31.0 for implicit 'value' subscriptions on signals
Previously, when you always had to specify the event name of 'value'
when calling `::subscribe` with a signal. Now, if you don't specify an
event name, 'value' is assumed.
2014-01-11 11:22:31 -07:00
Nathan Sobo
e2170ea907 Remove unused requires and mixins 2014-01-11 10:45:33 -07:00
Nathan Sobo
738bfd7253 Fix layout of tabs with flexbox repaint hack
The .item-views div needs to be the first child of pane and contain
the absolutely positioned repaint hack div inside it, otherwise the tabs
don't get honored as flexbox items.
2014-01-10 19:02:19 -07:00
Nathan Sobo
72fe586101 Remove the concept of focus from the model 2014-01-10 17:27:28 -07:00
Nathan Sobo
47870a1214 Remove views (rather than detaching) if Pane::destroyItem is called 2014-01-10 13:35:18 -07:00
Nathan Sobo
7665cd1a6a When a pane view is removed in anyway, make sure its model is destroyed 2014-01-10 12:35:12 -07:00
Nathan Sobo
d2146f9b2e Emit 'pane:removed' event in container when last pane is removed
Doing it in the pane view is awkward because the view may have already
been detached.
2014-01-10 11:45:08 -07:00
Nathan Sobo
8647137952 Remove active status management from Pane view; rely on model instead 2014-01-09 18:00:54 -07:00
Nathan Sobo
073ea84d69 Handle consequences of item removal in the model 2014-01-09 16:05:00 -07:00
Nathan Sobo
2965d2e974 Bind Pane view's focus to focus state on the model
It's a bit tricky… we don't want to blur the model when focusing the
pane's active view causes a focusout event on the pane, so we use
::suppressBlur on the model to prevent it from blurring as the focus
is transferred.
2014-01-09 16:01:52 -07:00
Nathan Sobo
8efcb1abfa Remove pane splitting/unsplitting logic from view
There's still some failing specs around focus management, but it's
getting closer.
2014-01-09 12:19:01 -07:00
Nathan Sobo
bb595ab08a Start adding PaneAxisModel 2014-01-09 12:19:00 -07:00
probablycorey
d908c8b026 Use absolute divs to limit repaints on keypresses 2014-01-08 14:31:46 -08:00
probablycorey
7eba9d3a23 Use flexbox to arrange panes 2014-01-08 14:29:32 -08:00
Nathan Sobo
c281eb9596 Move serialization of focus into PaneModel 2014-01-08 11:23:06 -07:00
Nathan Sobo
ee9b78afb6 Move copyActiveItem to PaneModel 2014-01-08 11:14:02 -07:00
Nathan Sobo
a379d47230 Move methods related to item destruction and saving to PaneModel 2014-01-08 11:12:27 -07:00
Corey Johnson & Nathan Sobo
5837b7cfda Move methods related to item movement to PaneModel 2014-01-07 18:39:39 -07:00
Corey Johnson & Nathan Sobo
1a487db29f Move item removal events to PaneModel 2014-01-07 17:55:56 -07:00
Corey Johnson & Nathan Sobo
2938a8e650 Move item-oriented methods to PaneModel 2014-01-07 17:47:42 -07:00
Corey Johnson & Nathan Sobo
cd97de76fc 💄 2014-01-07 17:28:53 -07:00