And actually use this functionality on MWBlockImage to
highlight centred images correctly.
FocusableNode
* Actually use $focusable to render the highlight correctly
ProtectedNode
* Allow a $phantomable element to define which element to
highlight on mouseenter
* As phatoms are built off shields, make sure a shield is
given to $phantomable
RelocatableNode
* Allow a $relocatable element to define which element the
relocatable marker is measured against
ui.Context
* Use $focusable (when available) for positioning the popup
Plus some documentation fixes
Change-Id: I370337239af4fc935cd86757b3ce03011bae5ba8
Add rerender event to all image loads in MWExtensioNode.
MWHieroNode's implementation of onParseSuccess is now the same as
its parent so can be deleted.
Change-Id: Iaa4999372f1ba88a7bdf1490fc3f8640af77ceae
!$element.is( ':visible' ) - jQuery .is() returns boolean based on the
parameter.
$element.not( ':visible' ) - jQuery .not() returns a filtered jQuery
collection with elements matching the parameter removed.
Change-Id: Iedf55f3453514ee710bbb6d702bbf9a5570a4a1d
ve.ui.Surface.js
* Make local overlay a child of ve-ui-surface and a sibling to
ve-ce-surface elements.
** This keeps local overlays relative to their surface and eliminates the
need for insane z-indexes.
ve.ui.PopupWidget.js
* PopupWidget boundaries are now relative to ve-ce-surface and no longer
protrude out
ve.ce.Node.css, ve.ui.Window.css
* Removal or replacement of insane z-indexes.
ve.ce.FocusableNode.js, ve.ce.ProtectedNode.js, ve.ce.ResizableNode.js,
ve.ui.Context.js
* Translate offsets from local overlay
ve.init.mw.ViewPageTarget-monobook.css,
ve.init.mw.ViewPageTarget-vector.css
* Skin specific z-indexes for global overlay
ve.init.mw.ViewPageTarget.js
* Applied direction specific mw class to ce.Surface vs ui.Surface to
prevent mw content styles from being applied to ui elements.
ve.ui.Dialog.css
* Adjustments to surface inside of dialog so that relative offsets for
local overlays can be properly calculated.
ve.ui.Surface.css
* Explicitly force .ve-ui-surface to be relative so that it's children can
be relatively positioned.
ve.ui.Widget.css
* Removal of unnecessary font-size properties now that local overlay is
sibling of surface.
ve.js
* Added get relative position helper method to translate position offsets
from target parent
Bug: 50241
Change-Id: Ibadce404a2286bc5dcec48f0d9da89004dbbd867
If a block image is resized and undone, there are lots of problems.
* The block image gets the wrong size. When rolling back the
transaction, height and width are passed as strings.
MWBlockImage tries to set the width to: width + 2. A 300px image
became 3002px.
* Resize handles didn't reposition and resize
* Relocatable drag marker didn't reposition and resize
* Focusable highlights didn't reposition and resize.
Change-Id: I8792b567b77da90ce5a2ad132e306705c5706606
Rational is that you wouldn't want to highlight something that is not
visible. And, obtaining offsets for hidden slugs in this case does not
return correct values.
Bug: 49818
Change-Id: Ic2818423c26f5bbb2c056c3c94740d822be4f1b8
Introduction of fake selection for single focused nodes. This
change specifically makes the selection much nicer in appearance
for Chrome users selecting floated FocusableNodes (block images)
for example.
Added ve-ce-surface-highlights DOM element to contain styled
highlight elements.
Made adjustments to getSelectionRect to return fake selection
bounds if necessary.
Replaced old uses of showSelection with model.change().
Change-Id: I96e66567cdce6455ef3eb77568e72f23140448ff
Objectives:
* Make the context menu display in the top right corner of the currently
focused inspectable node (if there is one)
* Prevent clicking on anything to do with the toolbar or popup from doing
anything at all, ever
Bonus:
* While we are using the clever feature in jQuery's on method which allows
passing boolean false to cancel the event - may as well do that in
ve.ui.Dialog as well
Changes:
ve.ui.FocusableNode
* Add ability to specify the focusable element so that dimensions can be
derived from it
ve.ce.Surface
* Add quotes to object keys
ve.ui.MediaDialog
* Change association from being MW specific to handling images in general
ve.ui.Context
* Add embedded styles for context
* Add embedded mode, which is triggered when the context is a single
focusable node, and the node is large enough to fit the context
reasonably
ve.ui.Dialog
* Inline mousedown handler
ve.ui.Toolbar, ve.ui.PopupWidget
* Cancel stray mousedown events
Change-Id: I4b25d33f64b4bcb8a3ecfd7e9728f54a2d4886f3
The constructor doesn't use any parameter named "$resizable".
And the one usage of it (ve.ce.ImageNode) doesn't pass any
arguments.
Follows-up 3fe3032.
Change-Id: I30530f4199a7c8383933be286b7b7a705c05c26c
*.php
* Added links to new file
ve.ce.ImageNode.js
* Added focusable node mixin
ve.ce.FocusableNode.js
* New class!
* Adds isFocused and setFocused methods
* When a node is focused or blurred, 'focus' and 'blur' events are emitted
* While a node is focused, it will have the 've-ce-node-focused' class added to it's this.$
ve.ce.Surface.js
* Add detection of node focusing and setting focus and blur on nodes on change
Change-Id: I3f1ad6309571f2bfe568550e2e8f1bd5a0302085