MouseEvents for Window

Hello. How can I use MouseEvents for my / extension of existing components (For example, window, and specifically I need a double click on the header)? As far as I understand, I need the "_id" property (webix UI v.5.4.0 GPL> webix_debug.js l.6818) which is not available in production mode. Is it possible to make this property not "private"? Or maybe there is another way to solve the problem?

Tagged:

Comments

  • If you have one or a few active zones, it will be more simple to use native HTML events

    $init: function(){
       webix.event( this.$view.querySelector(".some_element"), "dblclick", handler)
    }
    

    MouseEvents has a sense when you have multiple elements ( like in a list or a grid ) with similar behavior.

  • Unfortunately "dblclick" does not work for Apple devices like IPad.

  • Check the next snippet
    https://snippet.webix.com/3hgdvfgi

    The mixin was designed for data component, so to use it on window, you need to create a fake locate method. After that, you can use onDblClick and onClick to define handlers for css marked areas.

  • If I try to add something to the header, I will receive a duplication of events: https://snippet.webix.com/hus9bwfh
    That's why

     I need the "_id" property (webix UI v.5.4.0 GPL> webix_debug.js l.6818) which is not available in production mode.
    
  • I need the "_id" property

    I don't see how it will solve the issue

    Please check the updated snippet - you can get the clicked widget name/id and run or silence action based on it.

    https://snippet.webix.com/gjqde298

  • Thank you! Your approach is working. I'll try to use it.
    P.S. "_id" would help on line 6819 trg.getAttribute(this._id)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!