Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue events not being dispatched on Angular 4 #245

Open
dpodsiadlo opened this issue Nov 13, 2017 · 1 comment
Open

Queue events not being dispatched on Angular 4 #245

dpodsiadlo opened this issue Nov 13, 2017 · 1 comment

Comments

@dpodsiadlo
Copy link

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?

@wdamien
Copy link
Member

wdamien commented Dec 5, 2017

We're currently in the process of a version 2.0 rewrite, so we'll definitely take this into account. As for the current version, pull requests are also always welcome! There are a few other window references that may also cause issues, so if your local patch is working you might be better off waiting until v2 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants