@cloud-app-dev/vidc 3.0.18 → 3.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/CustomRenderSelect/index.d.ts +1 -1
- package/es/CustomRenderSelect/index.js +3 -3
- package/es/LoaderScript/utils.js +1 -0
- package/es/Map/AMap.d.ts +4 -0
- package/es/Map/LevelCenter/DragMarker/index.d.ts +1 -4
- package/es/Map/LevelCenter/DragMarker/index.js +2 -5
- package/es/Map/LevelCenter/index.js +13 -2
- package/es/Map/MapDrawSelect/demo.d.ts +2 -0
- package/es/Map/MapDrawSelect/demo.js +58 -0
- package/es/Map/MapDrawSelect/index.css +0 -0
- package/es/Map/MapDrawSelect/index.d.ts +14 -0
- package/es/Map/MapDrawSelect/index.js +49 -0
- package/es/Map/MouseTool/index.d.ts +10 -0
- package/es/Map/MouseTool/index.js +50 -0
- package/es/Map/MouseTool/useMouseTools.d.ts +7 -0
- package/es/Map/MouseTool/useMouseTools.js +63 -0
- package/es/Map/SinglePoint/index.d.ts +10 -3
- package/es/Map/SinglePoint/index.js +37 -15
- package/es/Map/index.d.ts +1 -1
- package/es/Map/interface.d.ts +2 -0
- package/es/Player/api/index.d.ts +2 -0
- package/es/Player/api/index.js +9 -0
- package/es/Player/contraller_bar/left_bar.js +7 -14
- package/es/Player/contraller_bar/time.d.ts +3 -0
- package/es/Player/contraller_bar/time.js +34 -0
- package/es/Player/contraller_bar/volume.d.ts +9 -0
- package/es/Player/contraller_bar/volume.js +86 -0
- package/es/Player/fps_play.d.ts +2 -1
- package/es/Player/fps_play.js +25 -6
- package/es/Player/frontend_timeline.js +6 -7
- package/es/Player/player.d.ts +5 -0
- package/es/Player/segment_player.js +0 -1
- package/es/Player/segment_timeline.js +46 -5
- package/es/Player/single_player.js +7 -3
- package/es/Player/style/bar.css +1 -1
- package/es/Player/style/iconfont.js +15 -16
- package/es/Player/style/timeline.css +7 -0
- package/es/Player/style/volume.css +19 -0
- package/es/Player/util.d.ts +1 -0
- package/es/Player/util.js +8 -1
- package/es/ScreenPlayer/LiveTools.js +7 -27
- package/es/ScreenPlayer/RecordTools.js +31 -16
- package/es/ScreenPlayer/ScreenSelect.js +2 -2
- package/es/ScreenPlayer/TimeMode.js +1 -1
- package/es/ScreenPlayer/index.css +17 -8
- package/es/ScreenPlayer/utils.js +4 -4
- package/icon-fix.js +31 -0
- package/package.json +1 -1
- package/es/Map/SinglePoint/Marker/index.d.ts +0 -7
- package/es/Map/SinglePoint/Marker/index.js +0 -29
- package/es/ScreenPlayer/TimeSlider.d.ts +0 -129
- package/es/ScreenPlayer/TimeSlider.js +0 -556
package/es/Player/util.js
CHANGED
|
@@ -153,4 +153,11 @@ export function tryCatch(fn) {
|
|
|
153
153
|
}, _callee, null, [[0, 5]]);
|
|
154
154
|
}));
|
|
155
155
|
}
|
|
156
|
-
export var FMT = 'YYYY-MM-DD HH:mm:ss';
|
|
156
|
+
export var FMT = 'YYYY-MM-DD HH:mm:ss';
|
|
157
|
+
export function getDomStyleValue(dom, styleKey) {
|
|
158
|
+
if (!dom) {
|
|
159
|
+
return '';
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return window.getComputedStyle(dom).getPropertyValue(styleKey);
|
|
163
|
+
}
|
|
@@ -18,6 +18,7 @@ import IconFont from '../Player/iconfont';
|
|
|
18
18
|
import ScreenSelect from './ScreenSelect';
|
|
19
19
|
import DisableMark from '../DisableMark';
|
|
20
20
|
import useFullscreen from '../useFullscreen';
|
|
21
|
+
import Volume from '../Player/contraller_bar/volume';
|
|
21
22
|
|
|
22
23
|
function LiveTools(_ref) {
|
|
23
24
|
var containerRef = _ref.containerRef,
|
|
@@ -79,9 +80,8 @@ function LiveTools(_ref) {
|
|
|
79
80
|
className: "player-tools-left"
|
|
80
81
|
}, /*#__PURE__*/React.createElement("span", {
|
|
81
82
|
className: "player-tools-item"
|
|
82
|
-
}, /*#__PURE__*/React.createElement(
|
|
83
|
-
|
|
84
|
-
title: "\u97F3\u91CF"
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Volume, {
|
|
84
|
+
api: player === null || player === void 0 ? void 0 : player.api
|
|
85
85
|
})), /*#__PURE__*/React.createElement("span", {
|
|
86
86
|
className: "player-tools-item"
|
|
87
87
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -102,12 +102,8 @@ function LiveTools(_ref) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
105
|
-
style: {
|
|
106
|
-
top: 2,
|
|
107
|
-
position: 'relative',
|
|
108
|
-
left: 1
|
|
109
|
-
},
|
|
110
105
|
type: "lm-player-S_Device_shezhi",
|
|
106
|
+
className: "icon-chajian",
|
|
111
107
|
title: "\u5207\u6362".concat(mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F")
|
|
112
108
|
})), /*#__PURE__*/React.createElement("div", {
|
|
113
109
|
className: "player-tools-item",
|
|
@@ -116,13 +112,8 @@ function LiveTools(_ref) {
|
|
|
116
112
|
marginRight: 6
|
|
117
113
|
}
|
|
118
114
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
119
|
-
type: "lm-player-
|
|
120
|
-
title: "\
|
|
121
|
-
style: {
|
|
122
|
-
fontSize: 14,
|
|
123
|
-
position: 'relative',
|
|
124
|
-
top: 1
|
|
125
|
-
}
|
|
115
|
+
type: "lm-player-close",
|
|
116
|
+
title: "\u5173\u95ED"
|
|
126
117
|
})), oneWinExtTools), /*#__PURE__*/React.createElement("div", {
|
|
127
118
|
className: "player-tools-mid"
|
|
128
119
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -133,19 +124,8 @@ function LiveTools(_ref) {
|
|
|
133
124
|
}
|
|
134
125
|
}, player && !player.video.paused ? /*#__PURE__*/React.createElement(IconFont, {
|
|
135
126
|
type: "lm-player-Pause_Main",
|
|
136
|
-
title: "\u6682\u505C"
|
|
137
|
-
style: {
|
|
138
|
-
fontSize: 22,
|
|
139
|
-
position: 'relative',
|
|
140
|
-
top: -2
|
|
141
|
-
}
|
|
127
|
+
title: "\u6682\u505C"
|
|
142
128
|
}) : /*#__PURE__*/React.createElement(IconFont, {
|
|
143
|
-
style: {
|
|
144
|
-
fontSize: 17,
|
|
145
|
-
position: 'relative',
|
|
146
|
-
left: 2,
|
|
147
|
-
top: 2
|
|
148
|
-
},
|
|
149
129
|
type: "lm-player-bofang",
|
|
150
130
|
title: "\u64AD\u653E"
|
|
151
131
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _useRafInterval from "ahooks/es/useRafInterval";
|
|
2
|
+
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
3
|
import _useUpdate from "ahooks/es/useUpdate";
|
|
4
|
+
import _useToggle3 from "ahooks/es/useToggle";
|
|
3
5
|
|
|
4
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
7
|
|
|
@@ -19,6 +21,7 @@ import ScreenSelect from './ScreenSelect';
|
|
|
19
21
|
import TimeSelect from './TimeSelect';
|
|
20
22
|
import TimeMode from './TimeMode';
|
|
21
23
|
import useFullscreen from '../useFullscreen';
|
|
24
|
+
import Volume from '../Player/contraller_bar/volume';
|
|
22
25
|
|
|
23
26
|
function RecordTools(_ref) {
|
|
24
27
|
var containerRef = _ref.containerRef,
|
|
@@ -43,6 +46,11 @@ function RecordTools(_ref) {
|
|
|
43
46
|
isFullscreen = _useFullscreen2[0],
|
|
44
47
|
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
45
48
|
|
|
49
|
+
var _useToggle = _useToggle3(false),
|
|
50
|
+
_useToggle2 = _slicedToArray(_useToggle, 2),
|
|
51
|
+
isFpsPlay = _useToggle2[0],
|
|
52
|
+
toggle = _useToggle2[1].toggle;
|
|
53
|
+
|
|
46
54
|
var update = _useUpdate(); // 播放状态控制
|
|
47
55
|
|
|
48
56
|
|
|
@@ -66,11 +74,17 @@ function RecordTools(_ref) {
|
|
|
66
74
|
};
|
|
67
75
|
|
|
68
76
|
var player = getPlayerItem();
|
|
77
|
+
|
|
78
|
+
_useUpdateEffect(function () {
|
|
79
|
+
var player = getPlayerItem();
|
|
80
|
+
isFpsPlay ? player.api.openFpsPlay() : player.api.closeFpsPlay();
|
|
81
|
+
}, [isFpsPlay]);
|
|
69
82
|
/**
|
|
70
83
|
* 定时获取play状态
|
|
71
84
|
*/
|
|
72
85
|
|
|
73
|
-
|
|
86
|
+
|
|
87
|
+
_useRafInterval(function () {
|
|
74
88
|
return update();
|
|
75
89
|
}, 2000);
|
|
76
90
|
|
|
@@ -80,9 +94,8 @@ function RecordTools(_ref) {
|
|
|
80
94
|
className: "player-tools-left"
|
|
81
95
|
}, /*#__PURE__*/React.createElement("span", {
|
|
82
96
|
className: "player-tools-item"
|
|
83
|
-
}, /*#__PURE__*/React.createElement(
|
|
84
|
-
|
|
85
|
-
title: "\u97F3\u91CF"
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Volume, {
|
|
98
|
+
api: player === null || player === void 0 ? void 0 : player.api
|
|
86
99
|
})), /*#__PURE__*/React.createElement("span", {
|
|
87
100
|
className: "player-tools-item"
|
|
88
101
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -109,13 +122,21 @@ function RecordTools(_ref) {
|
|
|
109
122
|
});
|
|
110
123
|
}
|
|
111
124
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
112
|
-
style: {
|
|
113
|
-
top: 2,
|
|
114
|
-
position: 'relative',
|
|
115
|
-
left: 1
|
|
116
|
-
},
|
|
117
125
|
type: "lm-player-S_Device_shezhi",
|
|
126
|
+
style: mode === 2 ? {
|
|
127
|
+
color: 'var(--primary)'
|
|
128
|
+
} : null,
|
|
129
|
+
className: "icon-chajian",
|
|
118
130
|
title: "\u5207\u6362".concat(mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F")
|
|
131
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
132
|
+
className: "player-tools-item",
|
|
133
|
+
onClick: toggle
|
|
134
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
135
|
+
type: "lm-player-zhuzhenplay",
|
|
136
|
+
style: isFpsPlay ? {
|
|
137
|
+
color: 'var(--primary)'
|
|
138
|
+
} : null,
|
|
139
|
+
title: "\u9010\u5E27\u64AD\u653E"
|
|
119
140
|
})), oneWinExtTools), /*#__PURE__*/React.createElement("div", {
|
|
120
141
|
className: "player-tools-mid"
|
|
121
142
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -140,12 +161,6 @@ function RecordTools(_ref) {
|
|
|
140
161
|
fontSize: 22
|
|
141
162
|
}
|
|
142
163
|
}) : /*#__PURE__*/React.createElement(IconFont, {
|
|
143
|
-
style: {
|
|
144
|
-
fontSize: 17,
|
|
145
|
-
position: 'relative',
|
|
146
|
-
left: 2,
|
|
147
|
-
top: 2
|
|
148
|
-
},
|
|
149
164
|
type: "lm-player-bofang",
|
|
150
165
|
title: "\u64AD\u653E"
|
|
151
166
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -12,10 +12,10 @@ function ScreenSelect(_ref) {
|
|
|
12
12
|
return ScreenType.find(function (v) {
|
|
13
13
|
return v.name === screenNum;
|
|
14
14
|
}).icon;
|
|
15
|
-
}, []);
|
|
15
|
+
}, [screenNum]);
|
|
16
16
|
return /*#__PURE__*/React.createElement(CustomRenderSelect, {
|
|
17
17
|
value: screenNum,
|
|
18
|
-
|
|
18
|
+
popupClassName: "custom-select-dropdown ",
|
|
19
19
|
customRender: function customRender() {
|
|
20
20
|
return /*#__PURE__*/React.createElement("span", {
|
|
21
21
|
className: "select-current-screen-item"
|
|
@@ -10,7 +10,7 @@ function TimeMode(_ref) {
|
|
|
10
10
|
value: timeMode,
|
|
11
11
|
onChange: onChange,
|
|
12
12
|
className: "time-mode-select",
|
|
13
|
-
|
|
13
|
+
popupClassName: "custom-select-dropdown",
|
|
14
14
|
placement: "topLeft"
|
|
15
15
|
}, TimeModeLibs.map(function (item) {
|
|
16
16
|
return /*#__PURE__*/React.createElement(_Select.Option, {
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
color: var(--gray1);
|
|
36
36
|
margin: 0 20px;
|
|
37
37
|
}
|
|
38
|
+
.split-screen-player-wrapper .icon-chajian {
|
|
39
|
+
position: relative;
|
|
40
|
+
top: 1px;
|
|
41
|
+
left: 1px;
|
|
42
|
+
font-size: 22px !important;
|
|
43
|
+
}
|
|
38
44
|
.split-screen-player-wrapper .player-tools {
|
|
39
45
|
height: 42px;
|
|
40
46
|
background-color: var(--gray12);
|
|
@@ -46,11 +52,13 @@
|
|
|
46
52
|
}
|
|
47
53
|
.split-screen-player-wrapper .player-tools .player-tools-left,
|
|
48
54
|
.split-screen-player-wrapper .player-tools .player-tools-right {
|
|
49
|
-
|
|
50
|
-
display:
|
|
51
|
-
|
|
55
|
+
width: 35%;
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-template-columns: repeat(auto-fill, 32px);
|
|
58
|
+
grid-gap: 10px;
|
|
52
59
|
}
|
|
53
60
|
.split-screen-player-wrapper .player-tools .player-tools-right {
|
|
61
|
+
display: flex;
|
|
54
62
|
justify-content: flex-end;
|
|
55
63
|
margin-right: 0;
|
|
56
64
|
margin-left: 4px;
|
|
@@ -69,10 +77,10 @@
|
|
|
69
77
|
width: 32px;
|
|
70
78
|
height: 32px;
|
|
71
79
|
color: var(--gray1);
|
|
72
|
-
text-align: center;
|
|
73
80
|
cursor: pointer;
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
76
84
|
}
|
|
77
85
|
.split-screen-player-wrapper .player-tools .player-tools-item .lm-player-iconfont {
|
|
78
86
|
font-size: 20px;
|
|
@@ -88,8 +96,9 @@
|
|
|
88
96
|
color: var(--gray1);
|
|
89
97
|
text-align: center;
|
|
90
98
|
cursor: pointer;
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
93
102
|
}
|
|
94
103
|
.split-screen-player-wrapper .player-tools .select-current-screen-item .lm-player-iconfont {
|
|
95
104
|
font-size: 20px;
|
package/es/ScreenPlayer/utils.js
CHANGED
|
@@ -2,22 +2,22 @@ export var ScreenType = [{
|
|
|
2
2
|
name: 1,
|
|
3
3
|
width: '100%',
|
|
4
4
|
height: '100%',
|
|
5
|
-
icon: 'lm-player-
|
|
5
|
+
icon: 'lm-player-fenping1'
|
|
6
6
|
}, {
|
|
7
7
|
name: 4,
|
|
8
8
|
width: '50%',
|
|
9
9
|
height: '50%',
|
|
10
|
-
icon: 'lm-player-
|
|
10
|
+
icon: 'lm-player-fenping4'
|
|
11
11
|
}, {
|
|
12
12
|
name: 6,
|
|
13
13
|
width: '33.33333333%',
|
|
14
14
|
height: '50%',
|
|
15
|
-
icon: 'lm-player-
|
|
15
|
+
icon: 'lm-player-fenping6'
|
|
16
16
|
}, {
|
|
17
17
|
name: 9,
|
|
18
18
|
width: '33.33333333%',
|
|
19
19
|
height: '33.33333333%',
|
|
20
|
-
icon: 'lm-player-
|
|
20
|
+
icon: 'lm-player-fenping9'
|
|
21
21
|
}, {
|
|
22
22
|
name: 16,
|
|
23
23
|
width: '25%',
|
package/icon-fix.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function readFile(path) {
|
|
5
|
+
return new Promise((resolve, reject) => {
|
|
6
|
+
fs.readFile(path, 'utf8', function (err, data) {
|
|
7
|
+
err ? reject(err) : resolve(data);
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function writeFile(path, data) {
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
fs.writeFile(path, data, 'utf-8', function (err) {
|
|
15
|
+
err ? reject(err) : resolve();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function run() {
|
|
21
|
+
try {
|
|
22
|
+
const url = path.resolve(__dirname, './src/Player/style/iconfont.js');
|
|
23
|
+
const str = await readFile(url);
|
|
24
|
+
const newStr = str.replace(/fill="\S+"/g, '');
|
|
25
|
+
await writeFile(url, newStr);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.error(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
run();
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { mapContext } from '../../Context';
|
|
2
|
-
import React, { useContext, useEffect } from 'react';
|
|
3
|
-
import useMarker from '../../useMarker';
|
|
4
|
-
import { createMapCenterIcon } from '../../icon';
|
|
5
|
-
import useMapType from '../../hook/useMapType';
|
|
6
|
-
|
|
7
|
-
function DragMarker(_ref) {
|
|
8
|
-
var point = _ref.point;
|
|
9
|
-
|
|
10
|
-
var _useContext = useContext(mapContext),
|
|
11
|
-
instance = _useContext.instance;
|
|
12
|
-
|
|
13
|
-
var type = useMapType();
|
|
14
|
-
var marker = useMarker({
|
|
15
|
-
map: instance.map,
|
|
16
|
-
center: type.leaflet ? [point.latitude, point.longitude] : [point.longitude, point.latitude],
|
|
17
|
-
createIcon: function createIcon() {
|
|
18
|
-
return createMapCenterIcon();
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
if (!marker) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
}, [marker]);
|
|
26
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default DragMarker;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { ISegmentType } from '../Player/player';
|
|
2
|
-
export interface ITimeSliderOptions {
|
|
3
|
-
hours_per_ruler?: number;
|
|
4
|
-
start_timestamp?: number;
|
|
5
|
-
timecell?: TimeCellItem[];
|
|
6
|
-
current_timestamp?: number;
|
|
7
|
-
onTimeChange?: (time: number, outTimeline?: boolean) => void;
|
|
8
|
-
onHoursPerChange?: (hour: number) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare type TimeCellItem = ISegmentType;
|
|
11
|
-
export default class TimeSlider {
|
|
12
|
-
canvas: HTMLCanvasElement;
|
|
13
|
-
options: ITimeSliderOptions;
|
|
14
|
-
canvansW: number;
|
|
15
|
-
canVansH: number;
|
|
16
|
-
minutes_per_step: number[];
|
|
17
|
-
graduation_step: number;
|
|
18
|
-
hours_per_ruler: number;
|
|
19
|
-
start_timestamp: number;
|
|
20
|
-
distance_between_gtitle: number;
|
|
21
|
-
zoom: number;
|
|
22
|
-
g_isMousedown: boolean;
|
|
23
|
-
g_isMousemove: boolean;
|
|
24
|
-
g_mousedownCursor: number;
|
|
25
|
-
current_timestamp: number;
|
|
26
|
-
timecell: TimeCellItem[];
|
|
27
|
-
domLeft: number;
|
|
28
|
-
constructor(canvas: HTMLCanvasElement, options: ITimeSliderOptions);
|
|
29
|
-
get ctx(): CanvasRenderingContext2D;
|
|
30
|
-
init(start_timestamp: number, timecell: TimeCellItem[], redrawFlag: boolean): void;
|
|
31
|
-
drawCurrentLine(): void;
|
|
32
|
-
drawCellBg(): void;
|
|
33
|
-
get_line_sizes(start_timestamp: number): {
|
|
34
|
-
num_steps: number;
|
|
35
|
-
px_offset: number;
|
|
36
|
-
ms_per_step: number;
|
|
37
|
-
px_per_step: number;
|
|
38
|
-
min_per_step: number;
|
|
39
|
-
medium_step: number;
|
|
40
|
-
ms_offset: number;
|
|
41
|
-
px_per_ms: number;
|
|
42
|
-
};
|
|
43
|
-
add_graduations(start_timestamp: number): void;
|
|
44
|
-
ms_to_next_step(timestamp: number, step: number): number;
|
|
45
|
-
/**
|
|
46
|
-
* 返回时间轴上刻度的时间
|
|
47
|
-
* @param {*} datetime new Date 格式
|
|
48
|
-
*/
|
|
49
|
-
graduation_title(datetime: Date): string;
|
|
50
|
-
/**
|
|
51
|
-
* 绘制线
|
|
52
|
-
* @param {*} beginX
|
|
53
|
-
* @param {*} beginY
|
|
54
|
-
* @param {*} endX
|
|
55
|
-
* @param {*} endY
|
|
56
|
-
* @param {*} color
|
|
57
|
-
* @param {*} width
|
|
58
|
-
*/
|
|
59
|
-
drawLine(beginX: number, beginY: number, endX: number, endY: number, color: string, width: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* 添加录像段
|
|
62
|
-
* @param {*} cells 录像数组
|
|
63
|
-
*/
|
|
64
|
-
add_cells(cells: TimeCellItem[]): void;
|
|
65
|
-
/**
|
|
66
|
-
* 绘制录像块
|
|
67
|
-
* @param {*} cell cell包括beginTime ms;endTime ms;style
|
|
68
|
-
*/
|
|
69
|
-
draw_cell(cell: TimeCellItem): void;
|
|
70
|
-
/**·
|
|
71
|
-
* 时间轴事件
|
|
72
|
-
*/
|
|
73
|
-
add_events(): void;
|
|
74
|
-
remove_events(): void;
|
|
75
|
-
destory(): void;
|
|
76
|
-
/**
|
|
77
|
-
* 拖动/点击 mousedown事件
|
|
78
|
-
*/
|
|
79
|
-
mousedownFunc: (e: MouseEvent) => void;
|
|
80
|
-
/**
|
|
81
|
-
* 鼠标移出隐藏时间 mouseout事件
|
|
82
|
-
* @param {*} e
|
|
83
|
-
*/
|
|
84
|
-
mouseoutFunc: () => void;
|
|
85
|
-
/**
|
|
86
|
-
* 拖动/鼠标hover显示 mousemove事件
|
|
87
|
-
*/
|
|
88
|
-
mousemoveFunc: (e: MouseEvent) => void;
|
|
89
|
-
/**
|
|
90
|
-
* 拖动/鼠标hover显示
|
|
91
|
-
*/
|
|
92
|
-
mousemoveFunc2: (e: MouseEvent) => void;
|
|
93
|
-
/**
|
|
94
|
-
* 点击 mouseup事件
|
|
95
|
-
*/
|
|
96
|
-
mouseupFunc: (e: MouseEvent) => void;
|
|
97
|
-
/**
|
|
98
|
-
* 拖动停止 mouseup事件
|
|
99
|
-
*/
|
|
100
|
-
mouseupFunc2: () => void;
|
|
101
|
-
/**
|
|
102
|
-
* 返回 2018-01-01 10:00:00 格式时间
|
|
103
|
-
* @param {*} time
|
|
104
|
-
*/
|
|
105
|
-
changeTime(time: number): string;
|
|
106
|
-
/**
|
|
107
|
-
* 设置时间,让这个时间点跳到中间红线处
|
|
108
|
-
* @param {*} time 单位ms
|
|
109
|
-
*/
|
|
110
|
-
set_time_to_middle(time: number): void;
|
|
111
|
-
/**
|
|
112
|
-
* 返回点击或者拖动的时间点
|
|
113
|
-
*/
|
|
114
|
-
returnMouseupTime(callback: (time: number) => void): void;
|
|
115
|
-
/**
|
|
116
|
-
* 滚轮放大缩小,以时间轴中心为准 mousewheel事件
|
|
117
|
-
*/
|
|
118
|
-
mousewheelFunc: (event: any) => void;
|
|
119
|
-
drawHourChange(hour: number): void;
|
|
120
|
-
/**
|
|
121
|
-
* 获取鼠标posx
|
|
122
|
-
* @param {*} e
|
|
123
|
-
*/
|
|
124
|
-
get_cursor_x_position: (e: MouseEvent) => number;
|
|
125
|
-
/**
|
|
126
|
-
* 清除canvas 每次重新绘制需要先清除
|
|
127
|
-
*/
|
|
128
|
-
clearCanvas(): void;
|
|
129
|
-
}
|