Skip to content

Queue events not being dispatched on Angular 4 #245

Open
@dpodsiadlo

Description

@dpodsiadlo

Hey guys! There's a really great CreateJS wrapper for Angular and Ionic. It includes type definitions for TypeScript and allows to import CreateJS to the project very easy. There's one issue though, in PreloadS, there's a function

 p._isCanceled = function () {
	if (window.createjs == null || this.canceled) {
		return true;
	}
	return false;
};

which checks if there's a window.createjs variable declared. In my case it's undefined and the _isCanceled function always returns true, which stops loading queue every time any file is loaded. So loading single or multiple files is stopped and none of the 'fileload' or 'complete' events is being dispatched. My quick fix for it was to declare the window.createjs variable like this:

import * as createjs from 'createjs-module';
(<any>window).createjs = createjs;

Is there any chance to fix the original code, perhaps skip checking the window variable?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions