update todo, and fix innerHTML view delay

This commit is contained in:
Quentin Hocdé
2018-02-02 09:34:24 -05:00
parent bd33e8cb02
commit 27c09301db
3 changed files with 39 additions and 96 deletions

View File

@@ -25,13 +25,15 @@ export default class {
}
displayView(view) {
setTimeout(() => {
console.log('----- ✅ [VIEW]:display :', view.getAttribute('data-template'));
this.wrapper.innerHTML = view.outerHTML;
$html.attr('data-template', view.getAttribute('data-template'));
// if you want a delay
setTimeout(() => {
$html
.addClass('dom-is-loaded')
.removeClass('dom-is-loading');

View File

@@ -5,7 +5,7 @@ import { EVENT as APP_EVENT } from '../App';
//List here all of your transitions
import * as transitions from './transitions';
const MODULE_NAME = 'TransitionManager';
const MODULE_NAME = 'Transition';
const EVENT_NAMESPACE = `${APP_NAME}.${MODULE_NAME}`;
const EVENT = {
@@ -16,11 +16,11 @@ const EVENT = {
@todo :
- get data-transition on clicked link -> launch() and add switch(){}
- add goto listener
- add newPageReady functon with google analytics send
- add overrideClass system for all transitions
- add base class manager like old DefaultTransition (dom-is-loaded, dom-is-loading etc..)
- get data-transition on clicked link -> launch() and add switch(){}
- add goto listener
- add newPageReady functon with google analytics send (maybe pjax do that?)
- add overrideClass system for all transitions
- add base class manager like old DefaultTransition (dom-is-loaded, dom-is-loading etc..)
*/

File diff suppressed because one or more lines are too long