[Layout] Cache reference to body later in mct-drag

Get a reference to the body element at link-time,
instead of instantiation time, from the mct-drag
directive. Failure to do so causes the reference
to fall out of date when switching between Browse
and Edit mode.

Supports position/sizing interactions for Layout
view, WTD-535.
This commit is contained in:
Victor Woeltjen 2014-12-05 14:20:50 -08:00
parent 7080ca585e
commit a0486495c4

View File

@ -6,10 +6,10 @@ define(
"use strict";
function MCTDrag($document) {
var body = $document.find('body');
function link(scope, element, attrs) {
var initialPosition,
var body = $document.find('body'),
initialPosition,
currentPosition,
delta;