本文整理汇总了TypeScript中tinymce/core/api/dom/DOMUtils.DOM.getStyle方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DOM.getStyle方法的具体用法?TypeScript DOM.getStyle怎么用?TypeScript DOM.getStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tinymce/core/api/dom/DOMUtils.DOM
的用法示例。
在下文中一共展示了DOM.getStyle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
const transposeUiContainer = function (element, pos) {
if (element && DOMUtils.DOM.getStyle(element, 'position', true) !== 'static') {
const containerPos = DOMUtils.DOM.getPos(element);
const dx = containerPos.x - element.scrollLeft;
const dy = containerPos.y - element.scrollTop;
return transpose(pos, -dx, -dy);
} else {
return transpose(pos, 0, 0);
}
};
示例2: function
const getUiContainerDelta = function () {
const uiContainer = Env.container;
if (uiContainer && DOMUtils.DOM.getStyle(uiContainer, 'position', true) !== 'static') {
const containerPos = DOMUtils.DOM.getPos(uiContainer);
const dx = containerPos.x - uiContainer.scrollLeft;
const dy = containerPos.y - uiContainer.scrollTop;
return Option.some({
x: dx,
y: dy
});
} else {
return Option.none();
}
};
示例3: function
const getUiContainerDelta = function (ctrl) {
const uiContainer = getUiContainer(ctrl);
if (uiContainer && DOMUtils.DOM.getStyle(uiContainer, 'position', true) !== 'static') {
const containerPos = DOMUtils.DOM.getPos(uiContainer);
const dx = uiContainer.scrollLeft - containerPos.x;
const dy = uiContainer.scrollTop - containerPos.y;
return Option.some({
x: dx,
y: dy
});
} else {
return Option.none();
}
};
示例4:
const getComputedFontProp = (propName: string, elm: HTMLElement): Option<string> => {
return Option.from(DOMUtils.DOM.getStyle(elm, propName, true));
};
示例5: hasClass
},
hasClass (elm, cls) {
return DOMUtils.DOM.hasClass(elm, cls);
},
toggleClass (elm, cls, state) {
return DOMUtils.DOM.toggleClass(elm, cls, state);
},
css (elm, name, value?) {
return DOMUtils.DOM.setStyle(elm, name, value);
},
getRuntimeStyle (elm, name) {
return DOMUtils.DOM.getStyle(elm, name, true);
},
on (target, name, callback, scope?) {
return DOMUtils.DOM.bind(target, name, callback, scope);
},
off (target, name, callback) {
return DOMUtils.DOM.unbind(target, name, callback);
},
fire (target, name, args) {
return DOMUtils.DOM.fire(target, name, args);
},
innerHtml (elm, html) {