Skip to content

Commit

Permalink
added canvasready event
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Jan 9, 2018
1 parent 643d2e1 commit c083bde
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/iiif-av-component.bundle.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/iiif-av-component.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iiif-av-component v0.0.6 https://github.com/iiif-commons/iiif-av-component#readme
// iiif-av-component v0.0.7 https://github.com/iiif-commons/iiif-av-component#readme

/// <reference types="base-component" />
declare namespace IIIFComponents {
Expand All @@ -23,6 +23,7 @@ declare namespace IIIFComponents {
}
declare namespace IIIFComponents.AVComponent {
class Events {
static CANVASREADY: string;
static PLAYCANVAS: string;
static PAUSECANVAS: string;
static LOG: string;
Expand Down
4 changes: 3 additions & 1 deletion dist/iiif-av-component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iiif-av-component v0.0.6 https://github.com/iiif-commons/iiif-av-component#readme
// iiif-av-component v0.0.7 https://github.com/iiif-commons/iiif-av-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifAvComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
/// <reference types="exjs" />
Expand Down Expand Up @@ -153,6 +153,7 @@ var IIIFComponents;
}
$timingControls.find('.canvasDuration').text(IIIFComponents.AVComponentUtils.Utils.formatTime(canvasInstance.canvasClockDuration));
that._logMessage('CREATED CANVAS: ' + canvasInstance.canvasClockDuration + ' seconds, ' + canvasInstance.canvasWidth + ' x ' + canvasInstance.canvasHeight + ' px.');
that.fire(AVComponent.Events.CANVASREADY);
}, false);
};
AVComponent.prototype.getCanvasInstanceById = function (canvasId) {
Expand Down Expand Up @@ -226,6 +227,7 @@ var IIIFComponents;
var Events = /** @class */ (function () {
function Events() {
}
Events.CANVASREADY = 'canvasready';
Events.PLAYCANVAS = 'play';
Events.PAUSECANVAS = 'pause';
Events.LOG = 'log';
Expand Down
4 changes: 2 additions & 2 deletions dist/iiif-av-component.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion examples/js/iiif-av-component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iiif-av-component v0.0.6 https://github.com/iiif-commons/iiif-av-component#readme
// iiif-av-component v0.0.7 https://github.com/iiif-commons/iiif-av-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifAvComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
/// <reference types="exjs" />
Expand Down Expand Up @@ -153,6 +153,7 @@ var IIIFComponents;
}
$timingControls.find('.canvasDuration').text(IIIFComponents.AVComponentUtils.Utils.formatTime(canvasInstance.canvasClockDuration));
that._logMessage('CREATED CANVAS: ' + canvasInstance.canvasClockDuration + ' seconds, ' + canvasInstance.canvasWidth + ' x ' + canvasInstance.canvasHeight + ' px.');
that.fire(AVComponent.Events.CANVASREADY);
}, false);
};
AVComponent.prototype.getCanvasInstanceById = function (canvasId) {
Expand Down Expand Up @@ -226,6 +227,7 @@ var IIIFComponents;
var Events = /** @class */ (function () {
function Events() {
}
Events.CANVASREADY = 'canvasready';
Events.PLAYCANVAS = 'play';
Events.PAUSECANVAS = 'pause';
Events.LOG = 'log';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iiif-av-component",
"version": "0.0.7",
"version": "0.0.8",
"description": "",
"main": "index.js",
"types": "./dist/iiif-av-component.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/AVComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ namespace IIIFComponents {

that._logMessage('CREATED CANVAS: '+ canvasInstance.canvasClockDuration +' seconds, '+ canvasInstance.canvasWidth +' x '+ canvasInstance.canvasHeight+' px.');

that.fire(AVComponent.Events.CANVASREADY);

}, false);

}
Expand Down Expand Up @@ -278,6 +280,7 @@ namespace IIIFComponents {

namespace IIIFComponents.AVComponent {
export class Events {
static CANVASREADY: string = 'canvasready';
static PLAYCANVAS: string = 'play';
static PAUSECANVAS: string = 'pause';
static LOG: string = 'log';
Expand Down

0 comments on commit c083bde

Please sign in to comment.