{"version":3,"sources":["kendo.tilelayout.js"],"names":["f","define","$","containsOrEqualTo","parent","child","contains","e","kendo","window","ui","Widget","Draggable","selector","selectorFromClasses","RESIZE","REORDER","NS","DOWNCURSOR","RIGHTCURSOR","DIAGONALCURSOR","RTLDIAGONALCURSOR","GRABCURSOR","GRABBINGCURSOR","MINIMALSPAN","CURSORCLASSES","tileLayoutStyles","wrapper","item","itemHeader","itemHeaderTitle","itemBody","reorderHint","resizeHint","TileLayout","extend","init","element","options","that","this","fn","call","cssNumber","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","addClass","styles","_setWrapperStyles","_initContainers","_resizable","_reorderable","events","name","columns","gap","rows","containers","resizable","reorderable","columnsWidth","rowsHeight","height","width","destroy","_draggableInstance","find","each","data","draggable","resizeHandle","off","remove","setOptions","deepExtend","empty","getOptions","result","items","id","container","header","headerSettings","body","containerSettings","headerContent","i","containerElements","children","hasElements","length","itemsMap","guid","current","attr","_addContainer","template","text","append","appendTo","bodyTemplate","Error","index","order","_setContainerCoordinates","push","css","grid-template-columns","format","grid-auto-rows","column-gap","padding","row-gap","settings","grid-column-end","colSpan","grid-row-end","rowSpan","_updateContainers","_createResizeHandle","side","down","_isresizing","_positionResizeHandle","cursorClass","leftBorderWidth","parseFloat","bottomBorderWidth","containerHeight","containerWidth","top","left","support","isRtl","removeClass","show","_createResizeHint","hint","insertAfter","_removeResizeHint","_positionHint","_removeAbsoluteStyles","_positionAbsolutely","position","outerWidth","outerHeight","fractionWidth","fractionHeight","currentContainer","rowsCount","lastXLocation","lastYLocation","initialWidth","initialHeight","startColSpan","startRowSpan","itemsMaxSpace","on","rectPosition","getBoundingClientRect","rightPosition","Math","abs","right","clientX","downPosition","bottom","clientY","Resizable","handle","start","currentTarget","split","_calculateFractionWidth","_calculateRightEndSide","x","location","parseInt","replace","scrollHeight","y","resize","overflowsLayout","isBeyondMinimum","hintColumns","hintRows","mouseDeltaX","mouseDeltaY","deltaFromStart","resizeRowsCount","resizeColumnsCount","clientRect","scrollX","floor","max","scrollY","resizeend","trigger","first","totalWidth","columnGap","_createDropHint","dropHint","columnEnd","rowEnd","direction","_insertDropHint","insertBefore","_removeDropHint","originalElement","itemSelector","headerSelector","filter","autoScroll","target","closest","clone","dragstart","drag","dropContainer","containerBoundaries","pixelsToLeftBorder","pixelsToRightBorder","newOrder","futureContainer","elementUnderCursor","sender","draggedItem","hide","hasClass","next","prev","dragend","oldOrder","itemId","indexAttr","end","sort","a","b","indexA","indexB","undefined","min","newIndex","oldIndex","kendoDropTarget","dragenter","dropContainerBoundaries","dropTarget","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,oBACH,aACA,oBACA,mBACDD,IACL,WAilBE,MA1kBC,UAAUE,GAgkBP,QAASC,GAAkBC,EAAQC,GAC/B,IACI,MAAOH,GAAEI,SAASF,EAAQC,IAAUD,GAAUC,EAChD,MAAOE,GACL,OAAO,GApkBlB,GACOC,GAAQC,OAAOD,MAAOE,EAAKF,EAAME,GAAIC,EAASD,EAAGC,OAAQC,EAAYF,EAAGE,UAAWC,EAAWL,EAAMM,oBAAqBC,EAAS,SAAUC,EAAU,UAAWC,EAAK,mBAAoBC,EAAa,qBAAsBC,EAAc,qBAAsBC,EAAiB,uBAAwBC,EAAoB,uBAAwBC,EAAa,gBAAiBC,EAAiB,oBAAqBC,EAAc,EAAGC,EAAgB,kFAC3bC,GACAC,QAAS,wBACTC,KAAM,2BACNC,WAAY,yCACZC,gBAAiB,eACjBC,SAAU,qCACVC,YAAa,gDACbC,WAAY,gDAEZC,EAAavB,EAAOwB,QACpBC,KAAM,SAAUC,EAASC,GACrB,GAAIC,GAAOC,IACX7B,GAAO8B,GAAGL,KAAKM,KAAKH,EAAMF,EAASC,GACnCpC,EAAEyC,UAAUC,iBAAkB,EAC9B1C,EAAEyC,UAAUE,eAAgB,EAC5B3C,EAAEyC,UAAUG,cAAe,EAC3B5C,EAAEyC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zBiG,UAAWW,EAAO5G,IAAI,mBACtBkG,OAAQU,EAAO5G,IAAI,gBACnBmG,UAAWA,IAEfI,EAAgBmB,OAChB/L,EAAKyK,gBAAgBa,EAAed,UAaxDrM,GAAGkP,OAAO1N,GACVhC,EAAEiC,QAAO,EAAMD,GAAce,OAAQvB,KACvCjB,OAAOD,MAAMqP,QACRpP,OAAOD,OACE,kBAAVP,SAAwBA,OAAO6P,IAAM7P,OAAS,SAAU8P,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.tilelayout.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.tilelayout', [\n 'kendo.core',\n 'kendo.draganddrop',\n 'kendo.resizable'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'tilelayout',\n name: 'TileLayout',\n category: 'web',\n depends: ['core']\n };\n (function ($) {\n var kendo = window.kendo, ui = kendo.ui, Widget = ui.Widget, Draggable = ui.Draggable, selector = kendo.selectorFromClasses, RESIZE = 'resize', REORDER = 'reorder', NS = '.kendoTileLayout', DOWNCURSOR = 'k-cursor-ns-resize', RIGHTCURSOR = 'k-cursor-ew-resize', DIAGONALCURSOR = 'k-cursor-nwse-resize', RTLDIAGONALCURSOR = 'k-cursor-nesw-resize', GRABCURSOR = 'k-cursor-grab', GRABBINGCURSOR = 'k-cursor-grabbing', MINIMALSPAN = 1, CURSORCLASSES = 'k-cursor-nesw-resize k-cursor-nwse-resize k-cursor-ew-resize k-cursor-ns-resize';\n var tileLayoutStyles = {\n wrapper: 'k-widget k-tilelayout',\n item: 'k-tilelayout-item k-card',\n itemHeader: 'k-tilelayout-item-header k-card-header',\n itemHeaderTitle: 'k-card-title',\n itemBody: 'k-tilelayout-item-body k-card-body',\n reorderHint: 'k-layout-item-hint k-layout-item-hint-reorder',\n resizeHint: 'k-layout-item-hint k-layout-item-hint-resize'\n };\n var TileLayout = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n $.cssNumber.gridColumnStart = true;\n $.cssNumber.gridColumnEnd = true;\n $.cssNumber.gridRowStart = true;\n $.cssNumber.gridRowEnd = true;\n that.element = $(element).addClass(TileLayout.styles.wrapper);\n that._setWrapperStyles();\n that._initContainers();\n that._resizable();\n that._reorderable();\n },\n events: [\n RESIZE,\n REORDER\n ],\n options: {\n name: 'TileLayout',\n columns: null,\n gap: {\n columns: 16,\n rows: 16\n },\n containers: [],\n resizable: false,\n reorderable: false,\n columnsWidth: '1fr',\n rowsHeight: '1fr',\n height: '',\n width: ''\n },\n destroy: function () {\n Widget.fn.destroy.call(this);\n if (this._draggableInstance) {\n this.element.find('.k-tilelayout-item').each(function () {\n var item = $(this);\n if (item.data('kendoDropTarget')) {\n item.data('kendoDropTarget').destroy();\n }\n });\n this._draggableInstance.destroy();\n this._draggableInstance.element = this._draggableInstance.draggable = null;\n }\n if (this.resizable) {\n this.resizable.destroy();\n this.resizable = null;\n }\n if (this.resizeHandle) {\n this.resizeHandle.off(NS).remove();\n this.resizeHandle = null;\n }\n this.element.off(NS);\n },\n setOptions: function (options) {\n this.destroy();\n kendo.deepExtend(this.options, options);\n this.element.empty();\n this.init(this.element, this.options);\n },\n getOptions: function () {\n var result = $.extend(true, {}, this.options);\n result.containers = kendo.deepExtend([], this.items);\n return result;\n },\n _initContainers: function () {\n var that = this;\n var containers = that.options.containers;\n var containerElements = that.element.children();\n var hasElements = !!containerElements.length;\n var id;\n var container;\n var header;\n var headerSettings;\n var body;\n var containerSettings;\n var headerContent;\n that.items = [];\n that.itemsMap = {};\n if (hasElements) {\n containerElements.each(function (i, element) {\n id = kendo.guid();\n var current = $(element).addClass(TileLayout.styles.item).attr('id', id);\n that._addContainer(current, containers[i], i, id);\n });\n } else {\n for (var i = 0; i < containers.length; i++) {\n id = kendo.guid();\n containerSettings = containers[i];\n container = $('
').addClass(TileLayout.styles.item).attr('id', id);\n headerSettings = containerSettings.header;\n if (headerSettings && (headerSettings.template || headerSettings.text)) {\n header = $('
').addClass(TileLayout.styles.itemHeader);\n if (that.options.reorderable) {\n header.addClass(GRABCURSOR);\n }\n if (headerSettings.text) {\n headerContent = '
' + headerSettings.text + '
';\n }\n header.append(headerContent || kendo.template(headerSettings.template)({}));\n header.appendTo(container);\n }\n body = $('
').addClass(TileLayout.styles.itemBody);\n if (!containerSettings.bodyTemplate) {\n throw new Error('Having a bodyTemplate for the container is mandatory');\n }\n body.append(kendo.template(containerSettings.bodyTemplate)({}));\n body.appendTo(container);\n container.appendTo(that.element);\n that._addContainer(container, containerSettings, i, id);\n }\n }\n },\n _addContainer: function (element, item, index, id) {\n var that = this;\n item.order = typeof item.order == 'number' ? item.order : index;\n element.attr(kendo.attr('index'), item.order);\n item.id = id;\n that._setContainerCoordinates(element, item);\n that.itemsMap[id] = item;\n that.items.push(that.itemsMap[id]);\n },\n _setWrapperStyles: function () {\n var that = this;\n var options = that.options;\n that.element.css({\n 'grid-template-columns': kendo.format('repeat({0}, minmax(0, {1}))', options.columns, typeof options.columnsWidth === 'string' ? options.columnsWidth : options.columnsWidth + 'px'),\n 'grid-auto-rows': kendo.format('minmax(0, {0})', typeof options.rowsHeight === 'string' ? options.rowsHeight : options.rowsHeight + 'px'),\n 'column-gap': options.gap.columns,\n 'width': typeof options.width === 'string' ? options.width : options.width + 'px',\n 'height': typeof options.height === 'string' ? options.height : options.height + 'px',\n 'padding': options.gap.rows + 'px ' + options.gap.columns + 'px ',\n 'row-gap': options.gap.rows\n });\n },\n _setContainerCoordinates: function (element, settings) {\n if (!settings) {\n return;\n }\n element.css({\n 'order': settings.order,\n 'grid-column-end': kendo.format('span {0}', settings.colSpan),\n 'grid-row-end': kendo.format('span {0}', settings.rowSpan)\n }).attr(kendo.attr('index'), settings.order);\n },\n _updateContainers: function () {\n var that = this;\n for (var i = 0; i < that.items.length; i++) {\n that._setContainerCoordinates(that.element.find('#' + that.items[i].id), that.items[i]);\n }\n },\n _createResizeHandle: function (container, side, down) {\n var that = this;\n if (that._isresizing) {\n return;\n }\n if (that.resizeHandle && that.resizeHandle.data('div')[0] !== container[0]) {\n that.resizeHandle.off(NS).remove();\n that.resizeHandle = null;\n }\n if (!that.resizeHandle) {\n that.resizeHandle = $('
');\n that.resizeHandle.appendTo(container);\n }\n that._positionResizeHandle(container, side, down);\n },\n _positionResizeHandle: function (container, side, down) {\n var that = this;\n var leftBorderWidth = parseFloat(container.css('borderRightWidth'));\n var bottomBorderWidth = parseFloat(container.css('borderBottomWidth'));\n var containerHeight = container.height();\n var containerWidth = container.width();\n var top = down ? containerHeight - 6.5 - bottomBorderWidth : 0;\n var left = side ? containerWidth - 4.5 - leftBorderWidth : 0;\n var width = 9;\n var height = 9;\n var cursorClass;\n if (side && down) {\n height = width = 25;\n top -= 12.5;\n left -= 12.5;\n cursorClass = kendo.support.isRtl(that.element) ? RTLDIAGONALCURSOR : DIAGONALCURSOR;\n } else if (side && !down) {\n height = containerHeight;\n cursorClass = RIGHTCURSOR;\n } else if (!side && down) {\n width = containerWidth;\n cursorClass = DOWNCURSOR;\n }\n that.resizeHandle.css({\n top: top,\n left: left,\n height: height,\n width: width\n }).attr('side', side).attr('down', down).removeClass(CURSORCLASSES).addClass(cursorClass).data('div', container).show();\n },\n _createResizeHint: function (container) {\n var that = this;\n if (that.hint) {\n return;\n }\n var colSpan = container.css('grid-column-end');\n var rowSpan = container.css('grid-row-end');\n var order = container.css('order');\n that.hint = $('
').css({\n 'order': order,\n 'grid-column-end': colSpan,\n 'grid-row-end': rowSpan\n }).insertAfter(container);\n },\n _removeResizeHint: function () {\n if (this._isresizing) {\n return;\n }\n if (this.hint) {\n this.hint.remove();\n this.hint = null;\n }\n },\n _positionHint: function (colSpan, rowSpan) {\n var that = this;\n if (colSpan) {\n that.hint.css('grid-column-end', kendo.format('span {0}', colSpan));\n }\n if (rowSpan) {\n that.hint.css('grid-row-end', kendo.format('span {0}', rowSpan));\n }\n },\n _removeAbsoluteStyles: function (container) {\n container.css('position', '');\n container.css('left', '');\n container.css('top', '');\n container.css('width', '');\n container.css('height', '');\n container.css('z-index', '');\n },\n _positionAbsolutely: function (container) {\n if (container.css('position') == 'absolute') {\n return;\n }\n var position = container.position();\n var width = container.outerWidth();\n var height = container.outerHeight();\n container.css('position', 'absolute');\n container.css('left', position.left);\n container.css('top', position.top);\n container.css('width', width);\n container.css('height', height);\n container.css('z-index', 2);\n },\n _resizable: function () {\n var that = this;\n var side;\n var down;\n var id;\n var fractionWidth;\n var fractionHeight;\n var currentContainer;\n var lastXLocation = 0;\n var lastYLocation = 0;\n var initialWidth = 0;\n var initialHeight = 0;\n var startColSpan = 0;\n var startRowSpan = 0;\n var itemsMaxSpace = 0;\n var rowsCount;\n if (that.options.resizable) {\n that.element.on('mousemove' + NS, selector(TileLayout.styles.item), function (e) {\n var rightPosition;\n var downPosition;\n var container = $(this);\n var rectPosition = container[0].getBoundingClientRect();\n rightPosition = Math.abs(rectPosition.right - e.clientX) < 16;\n downPosition = Math.abs(rectPosition.bottom - e.clientY) < 16;\n if (rightPosition && downPosition) {\n that._createResizeHandle(container, true, true);\n } else if (rightPosition) {\n that._createResizeHandle(container, true, false);\n } else if (downPosition) {\n that._createResizeHandle(container, false, true);\n }\n });\n that.resizable = new ui.Resizable(that.element, {\n handle: '.k-resize-handle',\n start: function (e) {\n var resizeHandle = $(e.currentTarget);\n currentContainer = resizeHandle.data('div');\n id = currentContainer.attr('id');\n side = resizeHandle.attr('side');\n down = resizeHandle.attr('down');\n rowsCount = that.element.css('grid-template-rows').split(' ').length;\n if (side) {\n fractionWidth = that._calculateFractionWidth();\n itemsMaxSpace = that._calculateRightEndSide(fractionWidth);\n lastXLocation = e.x.location;\n initialWidth = currentContainer.width();\n startColSpan = parseInt(currentContainer.css('grid-column-end').replace('span', ''), 10);\n }\n if (down) {\n fractionHeight = (that.element[0].scrollHeight - (rowsCount + 1) * that.options.gap.rows) / rowsCount;\n lastYLocation = e.y.location;\n initialHeight = currentContainer.height();\n startRowSpan = parseInt(currentContainer.css('grid-row-end').replace('span', ''), 10);\n }\n that._isresizing = true;\n },\n resize: function (e) {\n var hintColumns = 0;\n var hintRows = 0;\n var mouseDeltaX = 0;\n var mouseDeltaY = 0;\n var overflowsLayout;\n var isBeyondMinimum;\n var deltaFromStart = 0;\n var resizeRowsCount = 0;\n var resizeColumnsCount = 0;\n var clientRect = that.element[0].getBoundingClientRect();\n that._positionAbsolutely(currentContainer);\n that._createResizeHint(currentContainer);\n if (side == 'true') {\n mouseDeltaX = e.x.location - lastXLocation;\n overflowsLayout = clientRect.left + itemsMaxSpace - window.scrollX - e.x.location < that.options.gap.columns;\n isBeyondMinimum = initialWidth + mouseDeltaX < fractionWidth;\n if (!overflowsLayout && !isBeyondMinimum) {\n resizeColumnsCount = mouseDeltaX / (fractionWidth + that.options.gap.columns);\n deltaFromStart = mouseDeltaX - Math.floor(resizeColumnsCount) * (fractionWidth + that.options.gap.columns);\n hintColumns = startColSpan + Math.floor(resizeColumnsCount) + (deltaFromStart >= fractionWidth / 2 ? 1 : 0);\n that.itemsMap[id].colSpan = Math.max(hintColumns, MINIMALSPAN);\n } else {\n mouseDeltaX = 0;\n }\n }\n if (down == 'true') {\n mouseDeltaY = e.y.location - lastYLocation;\n overflowsLayout = clientRect.bottom + window.scrollY - e.y.location < that.options.gap.rows;\n isBeyondMinimum = initialHeight + mouseDeltaY <= fractionHeight;\n if (!overflowsLayout && !isBeyondMinimum) {\n resizeRowsCount = mouseDeltaY / (fractionHeight + that.options.gap.rows);\n deltaFromStart = mouseDeltaY - Math.floor(resizeRowsCount) * (fractionHeight + that.options.gap.rows);\n hintRows = startRowSpan + Math.floor(resizeRowsCount) + (deltaFromStart >= fractionHeight / 2 ? 1 : 0);\n that.itemsMap[id].rowSpan = Math.max(hintRows, MINIMALSPAN);\n } else {\n mouseDeltaY = 0;\n }\n }\n that._positionHint(hintColumns, hintRows);\n that._positionResizeHandle(currentContainer, side == 'true', down == 'true');\n if (mouseDeltaY) {\n currentContainer.css('height', initialHeight + mouseDeltaY);\n }\n if (mouseDeltaX) {\n currentContainer.css('width', initialWidth + mouseDeltaX);\n }\n },\n resizeend: function () {\n that._isresizing = false;\n that._setContainerCoordinates(currentContainer, that.itemsMap[id]);\n that._removeAbsoluteStyles(currentContainer);\n that._removeResizeHint();\n that.trigger(RESIZE, { container: currentContainer });\n }\n });\n }\n },\n _calculateFractionWidth: function () {\n var that = this;\n var container = that.element.children().first();\n var colSpan = that.itemsMap[container.attr('id')].colSpan;\n var totalWidth = container.outerWidth();\n return (totalWidth - (colSpan - 1) * that.options.gap.columns) / colSpan;\n },\n _calculateRightEndSide: function (fractionWidth) {\n var that = this;\n var columns = that.options.columns;\n var columnGap = that.options.gap.columns;\n return columns * (fractionWidth + columnGap) + columnGap;\n },\n _createDropHint: function (settings) {\n this.dropHint = $('
').css({\n 'order': settings.order,\n 'grid-column-end': settings.columnEnd,\n 'grid-row-end': settings.rowEnd\n }).attr(kendo.attr('index'), settings.order).attr('direction', settings.direction);\n },\n _insertDropHint: function (container, direction) {\n if (direction == 'right') {\n this.dropHint.insertAfter(container);\n } else {\n this.dropHint.insertBefore(container);\n }\n },\n _removeDropHint: function () {\n if (this.dropHint) {\n this.dropHint.remove();\n this.dropHint = null;\n }\n },\n _reorderable: function () {\n if (!this.options.reorderable) {\n return;\n }\n var that = this;\n var element = that.element;\n var originalElement;\n var itemSelector = selector(TileLayout.styles.item);\n var headerSelector = selector(TileLayout.styles.itemHeader);\n this._draggableInstance = new Draggable(this.element, {\n filter: headerSelector,\n autoScroll: true,\n hint: function (target) {\n var item = target.closest(itemSelector);\n var width = item.width();\n var height = item.height();\n var clone = item.clone();\n clone.find(headerSelector).removeClass(GRABCURSOR).addClass(GRABBINGCURSOR);\n return clone.width(width).height(height);\n },\n dragstart: function (e) {\n originalElement = $(e.currentTarget).closest(itemSelector);\n },\n drag: function (e) {\n var elementUnderCursor = kendo.elementUnderCursor(e);\n var hint = e.sender.hint;\n var dropContainer;\n var containerBoundaries;\n var pixelsToLeftBorder;\n var pixelsToRightBorder;\n var direction;\n var draggedItem = that._draggableInstance.currentTarget.closest(itemSelector);\n var newOrder;\n if (containsOrEqualTo(hint[0], elementUnderCursor)) {\n hint.hide();\n elementUnderCursor = kendo.elementUnderCursor(e);\n if (!containsOrEqualTo(originalElement[0], elementUnderCursor)) {\n if (that.dropHint && that.dropHint[0] == elementUnderCursor[0]) {\n hint.show();\n return;\n }\n dropContainer = $(elementUnderCursor);\n dropContainer = dropContainer.hasClass(TileLayout.styles.item) ? dropContainer : dropContainer.closest(itemSelector);\n if (dropContainer.hasClass(TileLayout.styles.item)) {\n containerBoundaries = dropContainer[0].getBoundingClientRect();\n pixelsToLeftBorder = e.clientX - containerBoundaries.left;\n pixelsToRightBorder = containerBoundaries.right - e.clientX;\n direction = pixelsToLeftBorder > pixelsToRightBorder ? 'right' : 'left';\n newOrder = dropContainer.css('order');\n if (that.dropHint && that.dropHint.attr('direction') !== direction) {\n var clone = that.dropHint.clone();\n clone.css('order', newOrder);\n that.dropHint.remove();\n that.dropHint = clone;\n that._insertDropHint(dropContainer, direction);\n that.dropHint.attr('direction', direction).attr(kendo.attr('index'), newOrder);\n } else if (!that.dropHint) {\n var futureContainer = direction == 'right' ? dropContainer.next() : dropContainer.prev();\n if (futureContainer[0] != originalElement[0]) {\n that._createDropHint({\n order: newOrder,\n columnEnd: draggedItem.css('grid-column-end'),\n rowEnd: draggedItem.css('grid-row-end'),\n direction: direction\n });\n originalElement.hide();\n that._insertDropHint(dropContainer, direction);\n }\n }\n }\n }\n hint.show();\n }\n },\n dragend: function (e) {\n if (!that.dropHint) {\n e.sender.hint.remove();\n that._removeDropHint();\n return;\n }\n var newOrder = parseInt(that.dropHint.css('order'), 10);\n var container = e.currentTarget.closest(itemSelector);\n var items = that.element.find(itemSelector);\n var oldOrder = parseInt(container.css('order'), 10);\n var itemId = container.attr('id');\n var containers = that.element.children(':visible');\n var indexAttr = kendo.attr('index');\n var start;\n var end;\n var item;\n var direction;\n containers.sort(function (a, b) {\n a = $(a);\n b = $(b);\n var indexA = a.attr(indexAttr);\n var indexB = b.attr(indexAttr);\n if (indexA === undefined) {\n indexA = $(a).index();\n }\n if (indexB === undefined) {\n indexB = $(b).index();\n }\n indexA = parseInt(indexA, 10);\n indexB = parseInt(indexB, 10);\n return indexA > indexB ? 1 : indexA < indexB ? -1 : 0;\n });\n newOrder = containers.index(that.dropHint[0]);\n end = Math.max(newOrder, oldOrder);\n start = Math.min(newOrder, oldOrder);\n that.itemsMap[itemId].order = newOrder;\n direction = newOrder > oldOrder ? 'right' : 'left';\n if (direction == 'left') {\n end--;\n } else {\n start++;\n }\n for (var i = start; i <= end; i++) {\n item = items.filter('[' + kendo.attr('index') + '=\\'' + i + '\\']');\n that.itemsMap[item.attr('id')].order += direction == 'left' ? 1 : -1;\n }\n container.show();\n that._updateContainers();\n e.sender.hint.remove();\n that._removeDropHint();\n that.trigger(REORDER, {\n newIndex: newOrder,\n oldIndex: oldOrder,\n container: container\n });\n }\n });\n element.find(itemSelector).kendoDropTarget({\n dragenter: function (e) {\n if (that._isresizing) {\n return;\n }\n var dropContainer = $(e.dropTarget);\n var target = that._draggableInstance.currentTarget.closest(itemSelector);\n var dropContainerBoundaries;\n var pixelsToLeftBorder;\n var pixelsToRightBorder;\n var futureContainer;\n var direction;\n if (originalElement[0] != dropContainer[0]) {\n dropContainerBoundaries = dropContainer[0].getBoundingClientRect();\n pixelsToLeftBorder = e.clientX - dropContainerBoundaries.left;\n pixelsToRightBorder = dropContainerBoundaries.right - e.clientX;\n direction = pixelsToLeftBorder > pixelsToRightBorder ? 'right' : 'left';\n futureContainer = direction == 'right' ? dropContainer.next() : dropContainer.prev();\n if (futureContainer[0] == originalElement[0]) {\n return;\n }\n that._removeDropHint();\n originalElement.hide();\n that._createDropHint({\n order: dropContainer.css('order'),\n columnEnd: target.css('grid-column-end'),\n rowEnd: target.css('grid-row-end'),\n direction: direction\n });\n originalElement.hide();\n that._insertDropHint(dropContainer, direction);\n }\n }\n });\n }\n });\n function containsOrEqualTo(parent, child) {\n try {\n return $.contains(parent, child) || parent == child;\n } catch (e) {\n return false;\n }\n }\n ui.plugin(TileLayout);\n $.extend(true, TileLayout, { styles: tileLayoutStyles });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}