Check documentation for the latest version of dhtmlxSuite setOffsets DHTMLX Docs

setOffsets

sets offsets for parent container from each side

void setOffsets(object conf);
confobjectoffsets config

Example

// init component
var myComponent = new dhtmlXComponent(...);
 
// setting offsets for parent container
// this also works for document.body init
myComponent.setOffsets({
    top: 10,
    right: 10,
    bottom: 10,
    left: 10
});
 
// also you can specify offset only for a single direction
myComponent.setOffsets({
    bottom: 10
});
 
// or for several directions
myComponent.setOffsets({
    right: 10,
    left: 10
});

Change log

added in 4.2

Back to top