Skip to content

Commit b33f2fb

Browse files
update to internal commit dbe236cb
1 parent 87c9fa1 commit b33f2fb

File tree

5 files changed

+55
-11
lines changed

5 files changed

+55
-11
lines changed

_config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
repositoryUrl: https://github.com/dynamsoft-docs/camera-enhancer-docs-js/blob/main
2-
repositoryUrlJS: https://github.com/dynamsoft-docs/camera-enhancer-docs-js/blob/main
32
repository: dynamsoft-docs/camera-enhancer-docs-js
43
docFullPath: https://www.dynamsoft.com/camera-enhancer/docs/web/
54
firstLevelUrl: /camera-enhancer/docs/web
@@ -69,7 +68,7 @@ defaults:
6968
- scope:
7069
path: "programming/javascript"
7170
values:
72-
category: "js-repo"
73-
edition: "js"
71+
docRootName: "Camera Enhancer JavaScript Edition"
72+
docHomePage: "/camera-enhancer/docs/web/programming/javascript/"
7473

7574
url: "https://www.dynamsoft.com" # sitemap root

programming/javascript/api-reference/drawinglayer.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ permalink: /programming/javascript/api-reference/drawinglayer.html
2121
| [removeDrawingItems()](#removedrawingitems) | Removes specified `DrawingItem` objects from the layer. |
2222
| [setDrawingItems()](#setdrawingitems) | Sets the layer's `DrawingItem` objects, replacing any existing items. |
2323
| [getDrawingItems()](#getdrawingitems) | Retrieves `DrawingItem` objects from the layer, optionally filtered by a custom function. |
24-
| [hasDrawingItem()](#hasDrawingItem) | Checks if a specific `DrawingItem` exists within the layer. |
24+
| [hasDrawingItem()](#hasdrawingitem) | Checks if a specific `DrawingItem` exists within the layer. |
2525
| [clearDrawingItems()](#cleardrawingitems) | Clears all `DrawingItem` objects from the layer. |
2626
| [onSelectionChanged()](#onselectionchanged) | Event triggered whenever there is a change in which `DrawingItem` objects are selected or deselected. |
2727
| [renderAll()](#renderall) | Forces a re-render of all `DrawingItem` objects on the layer. |
28+
| [setMode()](#setmode) | Changes the mode of the layer. |
29+
| [getMode()](#getmode) | Returns the current mode. |
2830

2931
**Special Notice**
3032

@@ -525,3 +527,47 @@ drawingLayer.onSelectionChanged = (selected, deselected) => {
525527
//Do something based on the selection change.
526528
}
527529
```
530+
531+
## setMode
532+
533+
Changes the mode of the layer.
534+
535+
```typescript
536+
setMode(newMode: string): void;
537+
```
538+
539+
**Parameters**
540+
541+
`newMode`: specifies the new mode. At present, the allowed values are "editor" and "viewer" and the default is "viewer".
542+
543+
> Compared with the "viewer" mode, the "editor" mode shows the "corners" and a "rotate control point" for a selected DrawingItem, which, when dragged, modify the original shape in different ways.
544+
545+
**Code Snippet**
546+
547+
```javascript
548+
let cameraView = cameraEnhancer.getCameraView();
549+
//Gets the `DrawingLayer` used by Dynamsoft Label Recognizer.
550+
let drawingLayer = cameraView.getDrawingLayer(3);
551+
drawingLayer.setMode("editor");
552+
```
553+
554+
## getMode
555+
556+
Returns the current mode.
557+
558+
```typescript
559+
getMode(): "editor" | "viewer";
560+
```
561+
562+
**Return value**
563+
564+
The mode of current `DrawingLayer` .
565+
566+
**Code Snippet**
567+
568+
```javascript
569+
let cameraView = cameraEnhancer.getCameraView();
570+
//Gets the `DrawingLayer` used by Dynamsoft Label Recognizer.
571+
let drawingLayer = cameraView.getDrawingLayer(3);
572+
let mode = drawingLayer.getMode();
573+
```

programming/javascript/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ permalink: /programming/javascript/index.html
2222
## Release Notes
2323

2424
* [Version 4.x](release-note/release-notes-4.x.html)
25-
* [Version 3.x](release-note/release-notes-3.x.html)
26-
* [Version 2.x](release-note/release-notes-2.x.html)
25+
<!-- * [Version 3.x](release-note/release-notes-3.x.html)
26+
* [Version 2.x](release-note/release-notes-2.x.html) -->

programming/javascript/release-note/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permalink: /programming/javascript/release-note/index.html
1515
* [4.0.2 (04/01/2024)](release-notes-4.x.html#402-04012024)
1616
* [4.0.1 (01/11/2024)](release-notes-4.x.html#401-01112024)
1717
* [4.0.0 (08/24/2023)](release-notes-4.x.html#400-08242023)
18-
* [3.3.10 (02/05/2024)](release-notes-3.x.html#3310-02052024)
18+
<!-- * [3.3.10 (02/05/2024)](release-notes-3.x.html#3310-02052024)
1919
* [3.3.9 (12/06/2023)](release-notes-3.x.html#339-12062023)
2020
* [3.3.8 (10/12/2023)](release-notes-3.x.html#338-10122023)
2121
* [3.3.7 (10/11/2023)](release-notes-3.x.html#337-10112023)
@@ -34,4 +34,4 @@ permalink: /programming/javascript/release-note/index.html
3434
* [2.1.0 (01/20/2022)](release-notes-2.x.html#210-01202022)
3535
* [2.0.3 (10/29/2021)](release-notes-2.x.html#203-10292021)
3636
* [2.0.1 (10/26/2021)](release-notes-2.x.html#201-10262021)
37-
* [2.0.0 (10/20/2021)](release-notes-2.x.html#200-10202021)
37+
* [2.0.0 (10/20/2021)](release-notes-2.x.html#200-10202021) -->

programming/javascript/user-guide/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ In this guide, you will learn step by step on how to integrate the Dynamsoft Cam
3535
- [Why can't I use my camera?](#why-cant-i-use-my-camera)
3636
- [API Documentation](#api-documentation)
3737
- [System Requirements](#system-requirements)
38-
- [Release Notes](#release-notes)
3938
- [Next Steps](#next-steps)
4039

4140
## Adding the SDK
@@ -362,9 +361,9 @@ The following table is a list of supported browsers based on the above requireme
362361

363362
Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK. Browser compatibility ultimately depends on whether the browser on that particular operating system supports the features listed above.
364363

365-
## Release Notes
364+
<!-- ## Release Notes
366365
367-
Learn about what are included in each release at [https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/release-note/index.html](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/release-note/index.html).
366+
Learn about what are included in each release at [https://www.dynamsoft.com/camera-enhancer/docs/programming/javascript/release-note/index.html](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/release-note/index.html). -->
368367

369368
## Next Steps
370369

0 commit comments

Comments
 (0)