1 Ext.define('Ext.chart.MaskLayer', {
2 extend: 'Ext.Component',
4 constructor: function(config) {
5 config = Ext.apply(config || {}, {
6 style: 'position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;'
8 this.callParent([config]);
11 initComponent: function() {
13 me.callParent(arguments);
23 initDraggable: function() {
24 this.callParent(arguments);
25 this.dd.onStart = function (e) {
29 // Cache the start [X, Y] array
30 this.startPosition = comp.getPosition(true);
32 // If client Component has a ghost method to show a lightweight version of itself
33 // then use that as a drag proxy unless configured to liveDrag.
34 if (comp.ghost && !comp.liveDrag) {
35 me.proxy = comp.ghost();
36 me.dragTarget = me.proxy.header.el;
39 // Set the constrainTo Region before we start dragging.
40 if (me.constrain || me.constrainDelegate) {
41 me.constrainTo = me.calculateConstrainRegion();