@cloud-app-dev/vidc 3.2.33 → 3.2.34
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/FullScreen/index.js
CHANGED
|
@@ -13,8 +13,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
|
|
15
15
|
import React from 'react';
|
|
16
|
-
import useFullscreen from "../useFullscreen";
|
|
17
16
|
import IconFont from "../IconFont";
|
|
17
|
+
import useFullscreen from "../useFullscreen";
|
|
18
18
|
import "./index.less";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/es/Picture/demo.js
CHANGED
|
@@ -39,9 +39,9 @@ export default function App() {
|
|
|
39
39
|
onClickRect: console.log,
|
|
40
40
|
onMenuClick: console.log,
|
|
41
41
|
menus: [{
|
|
42
|
-
title:
|
|
43
|
-
pathname:
|
|
44
|
-
icon:
|
|
42
|
+
title: '菜单1',
|
|
43
|
+
pathname: '/',
|
|
44
|
+
icon: ''
|
|
45
45
|
}],
|
|
46
46
|
imagePath: "http://192.168.100.246:1443/image/v1/100005251/objects/63882cf105f5f58310107e95/1669910400.jpg?signature=ad407ae3019acb29b14b4ed2817ad12f&watermark=m_61646D696E0A323032323132303154313332373434&expires=1669910400",
|
|
47
47
|
isOpenSelect: state.open,
|
|
@@ -62,7 +62,7 @@ export default function App() {
|
|
|
62
62
|
rect: [240.0, 468.0, 41.0, 36.0],
|
|
63
63
|
needExpand: true
|
|
64
64
|
}],
|
|
65
|
-
children: function children(
|
|
65
|
+
children: function children() {
|
|
66
66
|
return /*#__PURE__*/_jsx(_Button, {
|
|
67
67
|
onClick: function onClick() {
|
|
68
68
|
updateState({
|
package/es/Picture/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { IPictureProps } from './interface';
|
|
3
2
|
import './index.less';
|
|
3
|
+
import type { IPictureProps } from './interface';
|
|
4
4
|
declare function Picture({ className, width, height, minHeight, disabledDrag, imagePath, rects, isOpenSelect, disabledDrawMenu, menus, hasTool, fullScreenEle, ...props }: IPictureProps): JSX.Element;
|
|
5
5
|
declare namespace Picture {
|
|
6
6
|
var defaultProps: {
|
package/es/Picture/index.js
CHANGED
|
@@ -40,10 +40,10 @@ import DrawRect from "./component/DrawRect";
|
|
|
40
40
|
import Tools from "./component/Tools";
|
|
41
41
|
import WheelScale from "./component/WheelScale";
|
|
42
42
|
import { computedBound } from "./dragBound";
|
|
43
|
+
import "./index.less";
|
|
43
44
|
import { getRectImagePath } from "./loadCaptureRectImage";
|
|
44
45
|
import useDraw from "./useDraw";
|
|
45
46
|
import { computedRectScale, customContextMenu } from "./utils";
|
|
46
|
-
import "./index.less";
|
|
47
47
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
48
48
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
49
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -286,16 +286,7 @@ function Picture(_ref) {
|
|
|
286
286
|
|
|
287
287
|
|
|
288
288
|
var getRectImage = _useMemoizedFn(function (rect) {
|
|
289
|
-
|
|
290
|
-
rotate = state.rotate,
|
|
291
|
-
x = state.x,
|
|
292
|
-
y = state.y;
|
|
293
|
-
return getRectImagePath(domImgRef.current, rect, {
|
|
294
|
-
scale: scale,
|
|
295
|
-
rotate: rotate,
|
|
296
|
-
x: x,
|
|
297
|
-
y: y
|
|
298
|
-
});
|
|
289
|
+
return getRectImagePath(domImgRef.current, rect);
|
|
299
290
|
});
|
|
300
291
|
|
|
301
292
|
useEffect(function () {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import { ImageType } from './interface';
|
|
2
2
|
export declare function loadCaptureRectImage(image: HTMLImageElement, rect: number[], imageType: ImageType): Promise<string>;
|
|
3
|
-
export declare function getRectImagePath(image: HTMLImageElement, rect: number[]
|
|
4
|
-
scale: number;
|
|
5
|
-
rotate: number;
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
}): string;
|
|
3
|
+
export declare function getRectImagePath(image: HTMLImageElement, rect: number[]): string;
|
|
@@ -68,15 +68,6 @@ function _loadCaptureRectImage() {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export function getRectImagePath(image, rect) {
|
|
71
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
72
|
-
scale: 1,
|
|
73
|
-
rotate: 0,
|
|
74
|
-
x: 0,
|
|
75
|
-
y: 0
|
|
76
|
-
};
|
|
77
|
-
var scale = options.scale,
|
|
78
|
-
rotate = options.rotate;
|
|
79
|
-
|
|
80
71
|
var _rect = _slicedToArray(rect, 4),
|
|
81
72
|
x = _rect[0],
|
|
82
73
|
y = _rect[1],
|
|
@@ -104,7 +95,6 @@ export function getRectImagePath(image, rect) {
|
|
|
104
95
|
// document.body.appendChild(fullCanvas);
|
|
105
96
|
|
|
106
97
|
fullCtx.translate(naturalWidth / 2, naturalHeight / 2);
|
|
107
|
-
fullCtx.rotate(rotate * Math.PI / 180);
|
|
108
98
|
fullCtx.drawImage(image, -naturalWidth / 2, -naturalHeight / 2, naturalWidth, naturalHeight);
|
|
109
99
|
fullCtx.restore();
|
|
110
100
|
var imageData = fullCtx.getImageData(area[0], area[1], area[2], area[3]);
|
package/package.json
CHANGED