EventTool without visible Tool

Community plugins and extensions
Post Reply
User avatar
Posts: 8
Joined: Wed Oct 30, 2013 7:10 pm

EventTool without visible Tool

Post by dfliess »

Hi everyone!

I think that the EventTool plugin should not render it self (the outer div) if there are no Tools to be shown for one specific event. I mean if all the visibleFn return false there is a small square that I think shouldn't be there
EventTool.png (13.31 KiB) Viewed 4512 times
Here you have a piece of code that should do the work on Sch.plugin.EventTools:

onEventMouseEnter: function (sch, model, event) {

var visibleTBar = false;

this.items.each(function (tool) {
//must use isHidden as isVisible check if it's rendered
visibleTBar = visibleTBar || !tool.setVisible(tool.visibleFn(model) !== false).isHidden();
}, this);

if (visibleTBar) {

if (!this.rendered) {

var node = event.getTarget(sch.eventSelector);
var box = Ext.fly(node).getBox();

this.record = model;


// Needs to be done after doLayout
var size = this.getSize();

this.lastPosition = [
event.getXY()[0] - (size.width/2),
box.y - size.height - this.offset.y


Thank you very much.

User avatar
Core Developer
Core Developer
Posts: 16460
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden

Re: EventTool without visible Tool

Post by mats »

Good suggestion, fixing right now
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

API documentation

Post Reply