Skip to content
Snippets Groups Projects
Commit 79870195 authored by David Sehnal's avatar David Sehnal
Browse files

Updated packeges, fixed RCSB prop

parent 5c906546
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -78,7 +78,7 @@ export namespace IndexedCustomProperty {
function arrayToMap<Idx extends IndexedCustomProperty.Index, T>(array: ArrayLike<T>): Map<Idx, T> {
const ret = new Map<Idx, T>();
for (let i = 0 as Idx, _i = array.length; i < _i; i++) ret.set(i, array[i]);
for (let i = 0 as Idx, _i = array.length; i < _i; i++) ret.set(i, array[i as number]);
return ret;
}
......
......@@ -129,7 +129,7 @@ function createImmediateActions() {
}
function installReadyStateChangeImplementation() {
const html = doc!.documentElement;
const html = doc!.documentElement!;
registerImmediate = function(handle) {
// Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
// into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
......@@ -178,8 +178,8 @@ const immediateActions = (function () {
if (typeof setImmediate !== 'undefined') {
if (typeof window !== 'undefined') {
return {
setImmediate: (handler: any, ...args: any[]) => window.setImmediate(handler, ...args as any),
clearImmediate: (handle: any) => window.clearImmediate(handle)
setImmediate: (handler: any, ...args: any[]) => (window as any).setImmediate(handler, ...args as any) as number,
clearImmediate: (handle: any) => (window as any).clearImmediate(handle)
};
} else {
return { setImmediate, clearImmediate }
......
......@@ -189,7 +189,7 @@ namespace InputObserver {
function attach () {
element.addEventListener( 'contextmenu', onContextMenu, false )
element.addEventListener('wheel', onMouseWheel, false)
element.addEventListener('wheel', onMouseWheel as any, false)
element.addEventListener('mousedown', onPointerDown as any, false)
// for dragging to work outside canvas bounds,
// mouse move/up events have to be added to a parent, i.e. window
......@@ -214,7 +214,7 @@ namespace InputObserver {
element.removeEventListener( 'contextmenu', onContextMenu, false )
element.removeEventListener('wheel', onMouseWheel, false)
element.removeEventListener('wheel', onMouseWheel as any, false)
element.removeEventListener('mousedown', onMouseDown as any, false)
window.removeEventListener('mousemove', onMouseMove as any, false)
window.removeEventListener('mouseup', onMouseUp as any, false)
......
......@@ -5,13 +5,13 @@
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { Model } from 'mol-model/structure';
import { AttachModelProperties } from '../property-provider';
import { RCSB_assemblySymmetry } from './providers/rcsb';
export function attachModelProperties(model: Model): Promise<any>[] {
export const attachModelProperties: AttachModelProperties = (args) => {
// return a list of promises that start attaching the props in parallel
// (if there are downloads etc.)
return [
RCSB_assemblySymmetry(model)
RCSB_assemblySymmetry(args)
];
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment