Compare commits
No commits in common. "737d07b55f458567c79f1dee5874f04bc25fcb02" and "02f170655babeb62cb8c5d09364e420ab372cb1e" have entirely different histories.
737d07b55f
...
02f170655b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
/dist
|
|
||||||
/node_modules
|
|
@ -1,7 +1,4 @@
|
|||||||
import TimelineCanvas from './timeline-canvas.js';
|
class BBTimelineBackgroundCanvas extends BBTimelineCanvas {
|
||||||
|
|
||||||
|
|
||||||
class TimelineBackgroundCanvas extends TimelineCanvas {
|
|
||||||
constructor(parentEl, el) {
|
constructor(parentEl, el) {
|
||||||
super(parentEl, el);
|
super(parentEl, el);
|
||||||
}
|
}
|
||||||
@ -222,6 +219,3 @@ class TimelineBackgroundCanvas extends TimelineCanvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default TimelineBackgroundCanvas;
|
|
@ -1,4 +1,4 @@
|
|||||||
class TimelineCanvas {
|
class BBTimelineCanvas {
|
||||||
constructor(parentEl, el) {
|
constructor(parentEl, el) {
|
||||||
const a = this;
|
const a = this;
|
||||||
|
|
||||||
@ -180,6 +180,3 @@ class TimelineCanvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default TimelineCanvas;
|
|
@ -1,7 +1,4 @@
|
|||||||
import TimelineCanvas from './timeline-canvas.js';
|
class BBTimelineFlourishCanvas extends BBTimelineCanvas {
|
||||||
|
|
||||||
|
|
||||||
class TimelineFlourishCanvas extends TimelineCanvas {
|
|
||||||
constructor(parentEl, el) {
|
constructor(parentEl, el) {
|
||||||
super(parentEl, el);
|
super(parentEl, el);
|
||||||
}
|
}
|
||||||
@ -37,6 +34,3 @@ class TimelineFlourishCanvas extends TimelineCanvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default TimelineFlourishCanvas;
|
|
@ -1,7 +1,4 @@
|
|||||||
import TimelineCanvas from './timeline-canvas.js';
|
class BBTimelineForegroundCanvas extends BBTimelineCanvas {
|
||||||
|
|
||||||
|
|
||||||
class TimelineForegroundCanvas extends TimelineCanvas {
|
|
||||||
constructor(parentEl, el) {
|
constructor(parentEl, el) {
|
||||||
super(parentEl, el);
|
super(parentEl, el);
|
||||||
}
|
}
|
||||||
@ -211,6 +208,3 @@ class TimelineForegroundCanvas extends TimelineCanvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default TimelineForegroundCanvas;
|
|
@ -1,9 +1,8 @@
|
|||||||
import TimelineBackgroundCanvas from './timeline-background-canvas.js';
|
/**
|
||||||
import TimelineFlourishCanvas from './timeline-flourish-canvas.js';
|
* BBTimeline
|
||||||
import TimelineForegroundCanvas from './timeline-foreground-canvas.js';
|
* @version v0.1.1.277 apha (2023/11/12 0106)
|
||||||
|
*/
|
||||||
|
class BBTimeline {
|
||||||
class Timeline {
|
|
||||||
constructor(el) {
|
constructor(el) {
|
||||||
const a = this;
|
const a = this;
|
||||||
|
|
||||||
@ -50,9 +49,9 @@ class Timeline {
|
|||||||
|
|
||||||
const canvasList = a.Container.getElementsByTagName("canvas");
|
const canvasList = a.Container.getElementsByTagName("canvas");
|
||||||
|
|
||||||
a.Layer.Background = new TimelineBackgroundCanvas(a, canvasList[0]);
|
a.Layer.Background = new BBTimelineBackgroundCanvas(a, canvasList[0]);
|
||||||
a.Layer.Flourish = new TimelineFlourishCanvas(a, canvasList[1]);
|
a.Layer.Flourish = new BBTimelineFlourishCanvas(a, canvasList[1]);
|
||||||
a.Layer.Markers = new TimelineForegroundCanvas(a, canvasList[2]);
|
a.Layer.Markers = new BBTimelineForegroundCanvas(a, canvasList[2]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,6 +374,3 @@ class Timeline {
|
|||||||
OnDblClick(sender, e, event) { /* delegate */ }
|
OnDblClick(sender, e, event) { /* delegate */ }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default Timeline;
|
|
13
bbtimeline.min.js
vendored
Normal file
13
bbtimeline.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -10,13 +10,11 @@
|
|||||||
<!-- <script src="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/5.3.0/dist/js/bootstrap.bundle.min.js"></script> -->
|
<!-- <script src="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/5.3.0/dist/js/bootstrap.bundle.min.js"></script> -->
|
||||||
<!-- <link href="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" /> -->
|
<!-- <link href="http://cdn.hiimray.co.uk/8206c600-707c-469e-8d49-a76ae35782af/bootstrap/5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" /> -->
|
||||||
|
|
||||||
<script src="dist//timeline.min.js"></script>
|
<script src="bbtimeline.js"></script>
|
||||||
|
<script src="bbtimeline-canvas.js"></script>
|
||||||
<!-- <script src="bbtimeline.js"></script> -->
|
<script src="bbtimeline-background-canvas.js"></script>
|
||||||
<!-- <script src="bbtimeline-canvas.js"></script> -->
|
<script src="bbtimeline-flourish-canvas.js"></script>
|
||||||
<!-- <script src="bbtimeline-background-canvas.js"></script> -->
|
<script src="bbtimeline-foreground-canvas.js"></script>
|
||||||
<!-- <script src="bbtimeline-flourish-canvas.js"></script> -->
|
|
||||||
<!-- <script src="bbtimeline-foreground-canvas.js"></script> -->
|
|
||||||
|
|
||||||
<!-- <script src="bbtimeline.min.js"></script> -->
|
<!-- <script src="bbtimeline.min.js"></script> -->
|
||||||
|
|
||||||
@ -147,7 +145,7 @@ textarea {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var timeline1 = new LiteRyzJS.Timeline("myCanvas");
|
var timeline1 = new BBTimeline("myCanvas");
|
||||||
timeline1.OnMouseDown = function(sender, e, event) {
|
timeline1.OnMouseDown = function(sender, e, event) {
|
||||||
LogInfo("");
|
LogInfo("");
|
||||||
LogInfo("OnMouseDown");
|
LogInfo("OnMouseDown");
|
||||||
|
2343
package-lock.json
generated
2343
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "LiteRyzJS/Timeline",
|
|
||||||
"version": "0.2.0.121",
|
|
||||||
"devDependencies": {
|
|
||||||
"webpack": "^5.93.0",
|
|
||||||
"webpack-cli": "^5.1.4"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "webpack"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
// src/index.js
|
|
||||||
import Timeline from './timeline/timeline.js';
|
|
||||||
|
|
||||||
|
|
||||||
export { Timeline };
|
|
@ -1,48 +0,0 @@
|
|||||||
const path = require('path');
|
|
||||||
const { version } = require('./package.json');
|
|
||||||
const webpack = require('webpack');
|
|
||||||
|
|
||||||
|
|
||||||
class PrependVersionPlugin {
|
|
||||||
apply(compiler) {
|
|
||||||
compiler.hooks.emit.tapAsync('PrependVersionPlugin', (compilation, callback) => {
|
|
||||||
Object.keys(compilation.assets).forEach((filename) => {
|
|
||||||
if (filename.endsWith('.js')) {
|
|
||||||
const asset = compilation.assets[filename];
|
|
||||||
|
|
||||||
const headerText = `/*!\n * LiteRyzJS/Timeline v${version}\n * Copyright 2023-2024 Ray Lam (https://www.hiimray.co.uk)\n *\n */\n`;
|
|
||||||
|
|
||||||
const newContent = headerText + asset.source();
|
|
||||||
|
|
||||||
compilation.assets[filename] = {
|
|
||||||
source: () => newContent,
|
|
||||||
size: () => newContent.length,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
entry: {
|
|
||||||
timeline: './src/index.js'
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
filename: `[name].dist.js`,
|
|
||||||
path: path.resolve(__dirname, 'dist'),
|
|
||||||
library: 'LiteRyzJS',
|
|
||||||
libraryTarget: 'umd',
|
|
||||||
globalObject: 'this'
|
|
||||||
},
|
|
||||||
mode: 'production', // development|production
|
|
||||||
plugins: [
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env.VERSION': JSON.stringify(version)
|
|
||||||
}),
|
|
||||||
new PrependVersionPlugin()
|
|
||||||
]
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user