Hi, is there a way to extend the calculate method with math . Calculate seems to be a private function and I would like to extend some of the operations supported.
Please provide some more info, how do you want to extend the existing math operations ?
By the way, you can always define a custom math through template function
http://webix.com/snippet/79ade80a
Since the maths functionality ultimately runs an evaluate, I want to pass a javascript function off to the evaluate and still make use of the event notification mechanism that is provided by webix
Webix 2.1 will have ability to use custom functions in math expressions.
Hi , Will it be possible to share the changes that you will be doing in the version 2.1 so that I can have a look to see if they are similar to the changes that I am doing.
Do you have an active license ? I can publish the pre-release build through support area.
As for oncoming functionality, it doesn’t involve big changes. Existing math was designed with custom functions in mind, so it need to remove few too strict parsing rules.
As result, you will be able to use custom methods, like
function mysum(a, b){ return a+b };
and in datatable’s config
{ id:"diff", header: "Deficit/surplus", width: 180, math:"mysum([$r,:2] , [$r,exp])+1"},
Hi Maksim,
Can you tell me how I would go about extending the maths functionality within webix with the release version of the webix.js file.I want to make extend the maths capability to provide for custom functions and use internal functions (private _ methods defined in webix.js).
Can you provide me references or examples