本文整理汇总了TypeScript中bobril.invalidate函数的典型用法代码示例。如果您正苦于以下问题:TypeScript invalidate函数的具体用法?TypeScript invalidate怎么用?TypeScript invalidate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了invalidate函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: switch
c.onMessage = (c: longPollingClient.Connection, message: string, data: any) => {
if (!connected) {
connected = true;
reconnectDelay = 0;
b.invalidate();
}
switch (message) {
case "wait": {
wait = true;
b.invalidate();
break;
}
case "test": {
testing = true;
testUrl = data.url;
b.invalidate();
if (iframe != null) document.body.removeChild(iframe);
iframe = document.createElement("iframe");
document.body.appendChild(iframe);
iframe.src = testUrl;
break;
}
default: {
console.log("Unknown message: " + message, data);
break;
}
}
};
示例2: initRobotoFonts
export function initRobotoFonts(subsets = 'latin') {
WebFont.load({ google: { families: ['Roboto:400,500:' + subsets] },
active() { b.invalidate(); },
inactive() { b.invalidate(); },
classes: false
});
}
示例3: switch
c.onMessage = (c: longPollingClient.Connection, message: string, data: any) => {
if (!connected) {
connected = true;
b.invalidate();
}
switch (message) {
case "testUpdated": {
testSvrState = data;
b.invalidate();
break;
}
default: {
console.log("Unknown message: " + message, data);
break;
}
}
};
示例4: setInterval
const interval = setInterval(() => {
ctx.counter--;
if (ctx.counter <= 0) {
clearInterval(interval);
ctx.disabled = true;
}
b.invalidate();
}, 1000);
示例5: reconnect
function reconnect() {
disconnected = false;
c.connect();
c.send("newClient", {
userAgent: navigator.userAgent
});
b.invalidate();
}
示例6: updateColorModels
function updateColorModels(ctx: IColorPickerCtx, red: number, green: number, blue: number) {
ctx.hsv = graphics.rgbToHsv({ r: red, g: green, b: blue });
ctx.rgb.r = red;
ctx.rgb.g = green;
ctx.rgb.b = blue;
ctx.newPreviewColor = graphics.hsvToHex(ctx.hsv);
b.invalidate(ctx);
}
示例7: setTimeout
c.onClose = () => {
s.connected = false;
s.disconnected = true;
b.invalidate();
if (s.reconnectDelay < 30000) s.reconnectDelay += 1000;
setTimeout(() => {
reconnect();
}, s.reconnectDelay);
};
示例8: setTimeout
c.onClose = () => {
connected = false;
disconnected = true;
b.invalidate();
if (reconnectDelay < 30000) reconnectDelay += 1000;
setTimeout(() => {
reconnect();
}, reconnectDelay);
};
示例9: Header
b.init(() => {
b.invalidate();
return [
Header({ content: 'Game of life' }),
GameController({
runing: true,
startLiveCell: startLiveCell
})
];
});