本文整理匯總了TypeScript中maquette.Projector類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Projector類的具體用法?TypeScript Projector怎麽用?TypeScript Projector使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Projector類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
window.onhashchange = (evt) => {
projector.scheduleRender();
hash = window.location.hash;
if (page && page.destroy) {
page.destroy();
}
page = registry.initializePage(hash.substr(1)); // strips the # token
};
示例2: sendNotification
dataService.horizon('directMessages').findAll({ chatRoomId: chatRoomId }).order('timestamp', 'descending').limit(1).watch().subscribe((msg: any) => {
if (msg[0]) {
lastMessages.push(msg[0]); // TODO: check if there was already an object for the current chatroom available and overwrite it.
lastMessages.sort((msg1, msg2) => msg1.timestamp - msg2.timestamp);
let lastmessage = lastMessages[lastMessages.length - 1];
let notification: NotificationInfo = {title: otheruser.firstName, body: lastmessage.text};
sendNotification(notification);
}
projector.scheduleRender();
});
示例3:
(msg: any) => {
console.log('ok');
if (msg[0]) {
lastMessages.push(msg[0]); // TODO: check if there was already an object for the current chatroom available and overwrite it.
lastMessages.sort((msg1, msg2) => msg1.timestamp - msg2.timestamp);
let lastmessage = lastMessages[lastMessages.length - 1];
let notification: NotificationInfo = { title: otheruser.firstName, body: lastmessage.text };
//sendNotification(notification);
}
projector.scheduleRender();
}
示例4:
reader.readEntries((entries: any) => {
allEntries = entries;
projector.scheduleRender();
}, onErrorReadFile);
示例5: function
reader.onloadend = function () {
newFileContent = this.result;
projector.scheduleRender();
};
示例6:
fs.readdir(os.homedir(), (err: Error, results: string[]) => {
if (err) throw err;
filenames = results;
projector.scheduleRender();
});
示例7:
let setOtherUser = (otheruser: UserInfo) => {
username = `${otheruser.firstName} ${otheruser.lastName}`;
projector.scheduleRender();
}
示例8: mount
public mount(domNode:DisplayNode, renderFn:() => VNode):void {
this.projector.append(domNode, renderFn);
}
示例9:
.then((responseText) => {
projector.scheduleRender();
return responseText;
});