本文整理汇总了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;
});