B
bezold1@imas-net.de
Guest
Hello together, I have a surface with 1 to 8 rectangles in a listview. If the user clicks on a rectangle the color is changing and I'm executing an invoke function in the ABL Business Logic for booking goods receipts. Does anyone have the same problem, that the invoke function is executing two times? In Kendo the surface object gots two click events when I'm adding my function for the click event. I also checked this with the surface API example in the Dojo and there is only one click event. Does anyone have an idea what I'm doing wrong? Here is a part of my function to create the surface. rectGeometry1 = new geom.Rect(["0em", "0em"], ["10em", "9em"]); rect1 = new draw.Rect(rectGeometry1); rect1.stroke("black", 1); rect1.fill("white", 1); rectGeometry2 = new geom.Rect(["11em", "0em"], ["10em", "9em"]); rect2 = new draw.Rect(rectGeometry2); rect2.stroke("black", 1); rect2.fill("white", 1); rectGeometry3 = new geom.Rect(["0em", "10em"], ["10em", "9em"]); rect3 = new draw.Rect(rectGeometry3); rect3.stroke("black", 1); rect3.fill("white", 1); rectGeometry4 = new geom.Rect(["11em", "10em"], ["10em", "9em"]); rect4 = new draw.Rect(rectGeometry4); rect4.stroke("black", 1); rect4.fill("white", 1); surface = draw.Surface.create($("#surface"), { click: onClickOnSurface }); surfaceData = $("#surface").data("kendoSurface"); surfaceData.element.childrens = []; surfaceData.element.childrens[0] = rect1; surfaceData.element.childrens[1] = rect2; surfaceData.element.childrens[2] = rect3; surfaceData.element.childrens[3] = rect4; surface.draw(rect1); surface.draw(rect2); surface.draw(rect3); surface.draw(rect4); function onClickOnSurface(e) { e.element.fill("blue", 1); // Invoke function }
Continue reading...
Continue reading...