Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exception on click-drag-release-event in enable=false (Read 2648 times)
henry k
Junior Member
**
Offline


I Love MindFusion!

Posts: 51
Location: Finland
Joined: Apr 4th, 2012
Exception on click-drag-release-event in enable=false
May 11th, 2012 at 10:47am
Print Post  
Hi,

I get exception when user clicks-drags-releases on node/link.
Exception describes case that diagram is disabled or node is not focus-able or item/element property invisible set to  true...


Code (Javascript)
Select All
WebForms.DiagramView.prototype =
   {
...

_onClick: function(e)
       {
			if (this._focusable)
				this.get_element().focus();  // --- ERROR { Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. }

          if (this._stopselect)
            return false;

          if (this._currentAction)
            return false;

          cursor = this.getCursorPosition(e);

          if (!this._select)
          {
               this.PrepPostBack(new Array('click', cursor.x, cursor.y, 0, 0, 0, 0, cursor.x, cursor.y));
               return true;
          }

          if (e.target.nodeName == 'AREA' && e.shiftKey)
          {
               if (Sys.Browser.agent == Sys.Browser.Opera)
               {
                    e.preventDefault();
                    this.DoPostBack(new Array('selection_toggle', cursor.x, cursor.y, 0, 0, 0, 0, cursor.x, cursor.y));
               }
               else
               if (Sys.Browser.agent == Sys.Browser.Firefox)
                    this.DoPostBack(new Array('selection_toggle', cursor.x, cursor.y, 0, 0, 0, 0, cursor.x, cursor.y));
               else
                    this.PrepPostBack(new Array('selection_toggle', cursor.x, cursor.y, 0, 0, 0, 0, cursor.x, cursor.y));
          }
          else

               if (e.target.nodeName == 'AREA' && (!this._resize) && (!this._drawNode ||  this._currentAction!="draw"))
               this.PrepPostBack(new Array('selection_add', cursor.x, cursor.y, 0, 0, 0, 0, cursor.x, cursor.y));
          else
               if ((e.target.nodeName == 'IMG') && (!this._resize) && (this._selectedNodesBounds[0] != null))
               this.DoPostBack(new Array('selection_clear', 0, 0, 0, 0, 0, 0, cursor.x, cursor.y));

           e.stopPropagation();

       },
 



Br. Henry
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Exception on click-drag-release-event in enable=false
Reply #1 - May 14th, 2012 at 5:24pm
Print Post  
Hi,

What browser shows this error, and what does your DiagramView initialization code look like?

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint