ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { $, addDisposableListener, append, EventType, getWindow } from '../../../../base/browser/dom.js';
import { mainWindow } from '../../../../base/browser/window.js';
import { Button } from '../../../../base/browser/ui/button/button.js';
import { renderIcon } from '../../../../base/browser/ui/iconLabel/iconLabels.js';
import { Codicon } from '../../../../base/common/codicons.js';
import { Emitter, Event } from '../../../../base/common/event.js';
import { DisposableStore } from
localize
defaultButtonStyles
IScreenshot
AnnotationTool
Select
Freehand
Rectangle
Ellipse
Arrow
Text
Eraser
Pan
Crop
Move
label value
label value
label value
type AnnotationTool
strokeColor
fillColor
opacity
lineWidth
fontSize
fontFamily
points x y
rect x y width height
ellipseRect x y width height
arrowStart x y
arrowEnd x y
text
textPos x y
textWidth
erasedActions IAnnotationDrawAction
erasedIndices
cropFrom x y width height
cropTo x y width height
moveTarget IAnnotationDrawAction
moveBefore IAnnotationMoveSnapshot
moveAfter IAnnotationMoveSnapshot
points x y
rect x y width height
ellipseRect x y width height
arrowStart x y
arrowEnd x y
textPos x y
textWidth
IAnnotationDrawAction
actions IAnnotationDrawAction
undoneActions IAnnotationDrawAction
crop x y width height
dataUrl
state IAnnotationEditorState
action IAnnotationDrawAction identityMap MapIAnnotationDrawAction IAnnotationDrawAction IAnnotationDrawAction
existing identityMapaction
existing
existing
clone IAnnotationDrawAction
type actiontype
strokeColor actionstrokeColor
fillColor actionfillColor
opacity actionopacity
lineWidth actionlineWidth
fontSize actionfontSize
fontFamily actionfontFamily
points actionpoints actionpointsp x px y py
rect actionrect actionrect
ellipseRect actionellipseRect actionellipseRect
arrowStart actionarrowStart actionarrowStart
arrowEnd actionarrowEnd actionarrowEnd
text actiontext
textPos actiontextPos actiontextPos
textWidth actiontextWidth
cropFrom actioncropFrom actioncropFrom actioncropFrom
cropTo actioncropTo actioncropTo actioncropTo
moveBefore actionmoveBefore actionmoveBefore
moveAfter actionmoveAfter actionmoveAfter
identityMapaction clone
cloneerasedActions actionerasedActions actionerasedActionsa a identityMap
cloneerasedIndices actionerasedIndices actionerasedIndices
clonemoveTarget actionmoveTarget actionmoveTarget identityMap
clone
s IAnnotationMoveSnapshot IAnnotationMoveSnapshot
points spoints spointsp x px y py
rect srect srect
ellipseRect sellipseRect sellipseRect
arrowStart sarrowStart sarrowStart
arrowEnd sarrowEnd sarrowEnd
textPos stextPos stextPos
textWidth stextWidth
action IAnnotationDrawAction IAnnotationMoveSnapshot
points actionpoints
rect actionrect
ellipseRect actionellipseRect
arrowStart actionarrowStart
arrowEnd actionarrowEnd
textPos actiontextPos
textWidth actiontextWidth
action IAnnotationDrawAction snapshot IAnnotationMoveSnapshot
fresh snapshot
actionpoints freshpoints
actionrect freshrect
actionellipseRect freshellipseRect
actionarrowStart fresharrowStart
actionarrowEnd fresharrowEnd
actiontextPos freshtextPos
actiontextWidth freshtextWidth
a IAnnotationMoveSnapshot b IAnnotationMoveSnapshot
a b
disposables
toolOptionsDisposables
_onDidSave
onDidSave EventIAnnotationSaveResult _onDidSaveevent
_onDidCancel
onDidCancel Event _onDidCancelevent
container HTMLElement
canvas HTMLCanvasElement
ctx CanvasRenderingContext2D
activeTool AnnotationTool AnnotationToolFreehand
activeStrokeColor
activeFillColor
activeLineWidth
activeOpacity
actions DrawAction
undoneActions DrawAction
currentAction DrawAction
isDrawing
isErasing
pendingEraseActions DrawAction
pendingEraseIndices
imageElement HTMLImageElement
imageWidth
imageHeight
scale
panX
panY
isPanning
lastPanPoint x y
cropMode
cropRegion x y width height
cropDragHandle
cropDragStart x y
cropRegionStart x y width height
hasUserZoomed
pendingZoom factor cx cy
pendingZoomRaf
originalImage element HTMLImageElement width height
currentCrop x y width height
preCropState element HTMLImageElement width height currentCrop x y width height
mainToolbar HTMLElement
cropToolbar HTMLElement
cropMode currentCropx
cropMode currentCropy
selectedActionIndex
isDraggingSelected
isResizingSelectedText
dragStart x y
selectedTextResizeStartWidth
pendingMove target DrawAction before IAnnotationMoveSnapshot
activeFontSize
activeFontFamily value
textPlacementState
start x y
current x y
pointerId
textEditState
pos x y
text
caretIndex
strokeColor
fillColor
opacity
fontSize
fontFamily
width
showBoxOutline
textEditor HTMLTextAreaElement
textCaretVisible
textCaretInterval
toolButtons element HTMLElement tool AnnotationTool
undoBtn HTMLButtonElement
redoBtn HTMLButtonElement
toolOptionsPopover HTMLElement
screenshot IScreenshot
parentElement HTMLElement
initialState IAnnotationEditorState
container parentElement
containertabIndex
toolbar container
mainToolbar toolbar
drawingTools tool AnnotationTool label icon HTMLSpanElement
tool AnnotationToolSelect label icon Codiconinspect
tool AnnotationToolPan label icon Codiconmove
tool label icon drawingTools
toolbar tool label icon
cropBtn toolbar
cropBtnCodiconscreenCut
cropBtntitle
cropBtn
toolButtons element cropBtn tool AnnotationToolCrop
disposablescropBtn EventType
AnnotationToolCrop
moreDrawingTools tool AnnotationTool label icon HTMLSpanElement
tool AnnotationToolFreehand label icon Codiconedit
tool AnnotationToolRectangle label icon CodiconprimitiveSquare
tool AnnotationToolEllipse label icon Codiconcircle
tool AnnotationToolArrow label icon CodiconarrowRight
tool AnnotationToolEraser label icon Codiconeraser
tool label icon moreDrawingTools
toolbar tool label icon
toolbar AnnotationToolText CodiconsymbolString
toolOptionsPopover container
toolOptionsPopoverstyledisplay
disposablescontainer EventType e
toolOptionsPopover toolOptionsPopoverstyledisplay
target etarget Node
toolOptionsPopovertarget toolButtonsbutton buttonelementtarget
toolbar
undoBtn toolbar HTMLButtonElement
undoBtnCodicondiscard
undoBtntitle
undoBtn
disposablesundoBtn EventType
undoBtn undoBtn
redoBtn toolbar HTMLButtonElement
redoBtnCodiconredo
redoBtntitle
redoBtn
disposablesredoBtn EventType
redoBtn redoBtn
toolbar
discardBtn disposables toolbar defaultButtonStyles secondary
discardBtnlabel
disposablesdiscardBtn
_onDidCancel
saveBtn disposables toolbar defaultButtonStyles
saveBtnlabel
disposablessaveBtn
dataUrl
_onDidSave dataUrl state
cropToolbar container
cropToolbarstyledisplay
cropToolbar cropToolbar
cropCancelBtn disposables cropToolbar defaultButtonStyles secondary
cropCancelBtnlabel
disposablescropCancelBtn
cropApplyBtn disposables cropToolbar defaultButtonStyles
cropApplyBtnlabel
disposablescropApplyBtn
hint container
hinttextContent
canvasContainer container
canvas canvasContainer HTMLCanvasElement
ctx canvas
ctx
ctx ctx
disposablescanvas EventType e e
disposablescanvas EventType e e
disposablescanvas EventType e e
disposablescanvas EventType
disposablescanvasContainer EventType e WheelEvent
e
ectrlKey
delta edeltaY edeltaY edeltaX
factor delta
containerRect canvasContainer
cx eclientX containerRectleft containerRectwidth
cy eclientY containerRecttop containerRectheight
pendingZoom
pendingZoomfactor factor
pendingZoomcx cx
pendingZoomcy cy
pendingZoom factor cx cy
pendingZoomRaf
targetWindow canvas
pendingZoomRaf targetWindow
pendingZoomRaf
panX edeltaX
panY edeltaY
canvasstyletransform
passive
disposablescontainer EventType e KeyboardEvent
textEditState
textPlacementState ekey
e
e
ekey
cropMode
e
e
selectedActionIndex
selectedActionIndex
e
e
_onDidCancel
ekey cropMode
e
ekey ekey selectedActionIndex
e
removedIndex selectedActionIndex
removed actionsremovedIndex
selectedActionIndex
actions
type AnnotationToolEraser
strokeColor
opacity
lineWidth
erasedActions removed
erasedIndices removedIndex
undoneActionslength
resizeObserver
imageElement
hasUserZoomed
minScale
scale minScale
scale minScale
canvasstyletransform
resizeObservercanvasContainer
disposables resizeObserver
toolbar HTMLElement tool AnnotationTool label icon HTMLSpanElement
btn toolbar
btnicon
btntitle label
btn label
btn tool activeTool
tool activeTool
btnclassList
toolButtons element btn tool
disposablesbtn EventType e
e
tool
toolOptionsPopover
toolOptionsDisposables
toolOptionsPopovertextContent
toolOptionsPopover
toolOptionsPopover
toolOptionsPopover
activeTool AnnotationToolText
activeStrokeColor
color
activeStrokeColor color
activeTool AnnotationToolFreehand activeTool AnnotationToolArrow
toolOptionsPopover
activeTool AnnotationToolText
activeFillColor
color
activeFillColor color
toolOptionsPopover
toolOptionsPopover
container HTMLElement label colors selectedColor ariaLabelPrefix color
group container
group textContent label
swatches group
color colors
swatch swatches HTMLButtonElement
isTransparent color
swatchclassList isTransparent
swatchclassList color
swatchstylebackgroundColor isTransparent color
swatch isTransparent ariaLabelPrefix ariaLabelPrefix color
swatch color selectedColor
swatchclassList color selectedColor
toolOptionsDisposablesswatch EventType e
e
color
container HTMLElement
isText activeTool AnnotationToolText
values isText
selectedValue isText activeFontSize activeLineWidth
group container
group textContent isText
buttons group
value values
button buttons HTMLButtonElement
buttontextContent
button isText value value
button value selectedValue
buttonclassList value selectedValue
toolOptionsDisposablesbutton EventType e
e
isText
activeFontSize value
activeLineWidth value
container HTMLElement
group container
label group
labeltextContent
input group HTMLInputElement
inputtype
inputmin
inputmax
inputstep
inputvalue
input
value group
valuetextContent
toolOptionsDisposablesinput EventType e
e
activeOpacity inputvalue
valuetextContent
textEditState
textEditStatestrokeColor activeStrokeColor
textEditStatefillColor activeFillColor
textEditStateopacity activeOpacity
textEditStatefontSize activeFontSize
anchor HTMLElement
toolOptionsPopover activeTool
containerRect container
anchorRect anchor
toolOptionsPopoverstyletop
toolOptionsPopoverstyledisplay
halfWidth toolOptionsPopoveroffsetWidth
desiredLeft anchorRectleft anchorRectwidth containerRectleft
minLeft halfWidth
maxLeft MathminLeft containerRectwidth halfWidth
toolOptionsPopoverstyleleft
toolOptionsPopover
toolOptionsPopoverstyledisplay
tool AnnotationTool
tool AnnotationToolFreehand
tool AnnotationToolRectangle
tool AnnotationToolEllipse
tool AnnotationToolArrow
tool AnnotationToolText
tool AnnotationTool
textEditState tool AnnotationToolText
textPlacementState tool AnnotationToolText
tool AnnotationToolCrop
activeTool tool
selectedActionIndex
tb toolButtons
tbelementclassList tbtool tool
tbelement tbtool tool
activeToolButton toolButtonstb tbtool toolelement
activeToolButton tool
activeToolButton
canvasstylecursor tool AnnotationToolSelect
tool AnnotationToolPan
tool AnnotationToolEraser
cropMode originalImage
preCropState
element imageElement
width imageWidth
height imageHeight
currentCrop currentCrop
imageElement originalImageelement
imageWidth originalImagewidth
imageHeight originalImageheight
cropRegion currentCrop
currentCrop
x y width originalImagewidth height originalImageheight
cropMode
tb toolButtons
tbelementclassList tbtool AnnotationToolCrop
mainToolbar mainToolbarstyledisplay
cropToolbar cropToolbarstyledisplay
hasUserZoomed
panX
panY
canvasstyletransform
canvasstylecursor
cropMode
cropRegion
cropDragHandle
cropRegionStart
preCropState
mainToolbar mainToolbarstyledisplay
cropToolbar cropToolbarstyledisplay
activeTool
cropMode cropRegion originalImage
cr cropRegion
crwidth crheight
cropFrom preCropStatecurrentCrop
cropAction DrawAction
type AnnotationToolCrop
strokeColor
opacity
lineWidth
cropFrom
cropTo cr
actionscropAction
undoneActionslength
hasUserZoomed
panX
panY
canvasstyletransform
cr
cropMode preCropState
imageElement preCropStateelement
imageWidth preCropStatewidth
imageHeight preCropStateheight
currentCrop preCropStatecurrentCrop
hasUserZoomed
panX
panY
canvasstyletransform
img mainWindowdocument
img
imageElement img
imageWidth imgnaturalWidth
imageHeight imgnaturalHeight
originalImage element img width imgnaturalWidth height imgnaturalHeight
currentCrop
initialState initialStateactionslength initialStateundoneActionslength
identityMap
actionsinitialStateactionsa a identityMap
undoneActionsinitialStateundoneActionsa a identityMap
initialStatecrop
imgsrc screenshotdataUrl
crop x y width height
originalImage
crop
imageElement originalImageelement
imageWidth originalImagewidth
imageHeight originalImageheight
currentCrop
cr
x Math MathoriginalImagewidth cropx
y Math MathoriginalImageheight cropy
width Math MathoriginalImagewidth Math cropx cropwidth
height Math MathoriginalImageheight Math cropy cropheight
cropCanvas mainWindowdocument
cropCanvaswidth crwidth
cropCanvasheight crheight
cropCtx cropCanvas
cropCtxoriginalImageelement crx cry crwidth crheight crwidth crheight
croppedImg mainWindowdocument
croppedImg
imageElement croppedImg
imageWidth croppedImgnaturalWidth
imageHeight croppedImgnaturalHeight
currentCrop cr
croppedImgsrc cropCanvas
IAnnotationEditorState
identityMap
actions actionsa a identityMap
undoneActions undoneActionsa a identityMap
crop currentCrop currentCrop
container canvasparentElement
container
targetWindow canvas
dpr targetWindowdevicePixelRatio
maxWidth containerclientWidth
maxHeight containerclientHeight
hasUserZoomed
scaleX maxWidth imageWidth
scaleY maxHeight imageHeight
scale MathscaleX scaleY
displayWidth MathimageWidth scale
displayHeight MathimageHeight scale
canvasstylewidth
canvasstyleheight
naturalW displayWidth dpr
naturalH displayHeight dpr
overage Math naturalW naturalH
effectiveDpr dpr overage
canvaswidth Math MathdisplayWidth effectiveDpr
canvasheight Math MathdisplayHeight effectiveDpr
ctxeffectiveDpr effectiveDpr
e PointerEvent x y
rect canvas
x eclientX rectleft scale cropOffsetX
y eclientY recttop scale cropOffsetY
e PointerEvent
pos e
cropMode cropRegion
handle pos
handle
cropDragHandle handle
cropDragStart pos
cropRegionStart cropRegion
canvasepointerId
activeTool AnnotationToolSelect
hitIndex pos
selectedActionIndex hitIndex
hitIndex
hitAction actionshitIndex
pendingMove target hitAction before hitAction
hitActiontype AnnotationToolText pos hitAction
isResizingSelectedText
dragStart x posx y posy
selectedTextResizeStartWidth hitActiontextWidth
canvasepointerId
canvasstylecursor
isDraggingSelected
dragStart x posx y posy
canvasepointerId
canvasstylecursor
selectedActionIndex
activeTool AnnotationToolText
textPlacementState
start pos
current pos
pointerId epointerId
canvasepointerId
activeTool AnnotationToolEraser
isErasing
canvasepointerId
pos
activeTool AnnotationToolPan
isPanning
lastPanPoint x eclientX y eclientY
canvasepointerId
canvasstylecursor
isDrawing
canvasepointerId
activeTool
AnnotationToolFreehand
currentAction
type AnnotationToolFreehand
strokeColor activeStrokeColor
opacity activeOpacity
lineWidth activeLineWidth
points pos
AnnotationToolRectangle
currentAction
type AnnotationToolRectangle
strokeColor activeStrokeColor
fillColor activeFillColor
opacity activeOpacity
lineWidth activeLineWidth
rect x posx y posy width height
AnnotationToolEllipse
currentAction
type AnnotationToolEllipse
strokeColor activeStrokeColor
fillColor activeFillColor
opacity activeOpacity
lineWidth activeLineWidth
ellipseRect x posx y posy width height
AnnotationToolArrow
currentAction
type AnnotationToolArrow
strokeColor activeStrokeColor
opacity activeOpacity
lineWidth activeLineWidth
arrowStart pos
arrowEnd pos
e PointerEvent
cropMode
pos e
cropDragHandle cropRegionStart
pos
handle pos
canvasstylecursor handle
isResizingSelectedText selectedActionIndex
pos e
action actionsselectedActionIndex
actiontype AnnotationToolText
actiontextWidth Math selectedTextResizeStartWidth posx dragStartx
isDraggingSelected selectedActionIndex
pos e
dx posx dragStartx
dy posy dragStarty
actionsselectedActionIndex dx dy
dragStart x posx y posy
isPanning
dx eclientX lastPanPointx
dy eclientY lastPanPointy
panX dx
panY dy
lastPanPoint x eclientX y eclientY
canvasstyletransform
textPlacementState
pos e
textPlacementStatecurrent pos
isErasing
pos e
pos
activeTool AnnotationToolSelect selectedActionIndex
pos e
action actionsselectedActionIndex
actiontype AnnotationToolText pos action
canvasstylecursor
selectedActionIndex
canvasstylecursor
isDrawing
pos e
currentAction
currentActiontype
AnnotationToolFreehand
currentActionpointspos
AnnotationToolRectangle
rect currentActionrect
currentAction rect x y width height rect
rect
width posx rectx
height posy recty
AnnotationToolEllipse
er currentActionellipseRect
w posx erx
h posy ery
eshiftKey
size MathMathw Mathh
w Mathw size
h Mathh size
currentAction ellipseRect x y width height ellipseRect er width w height h
AnnotationToolArrow
currentAction arrowEnd x y arrowEnd pos
e PointerEvent
cropMode cropDragHandle
cropDragHandle
cropRegionStart
canvasepointerId
isResizingSelectedText
isResizingSelectedText
canvasepointerId
canvasstylecursor
isDraggingSelected
isDraggingSelected
canvasepointerId
canvasstylecursor
isPanning
isPanning
canvasepointerId
canvasstylecursor activeTool AnnotationToolPan
isErasing
isErasing
canvasepointerId
pendingEraseActionslength
actions
type AnnotationToolEraser
strokeColor
opacity
lineWidth
erasedActions pendingEraseActions
erasedIndices pendingEraseIndices
pendingEraseActions
pendingEraseIndices
undoneActionslength
textPlacementState
start current pointerId textPlacementState
pointerId epointerId
canvasepointerId
dx currentx startx
didDrag Mathdx
x didDrag Mathstartx currentx startx
rawWidth didDrag Mathdx startx
width didDrag
Math MathrawWidth x
rawWidth
y starty
textPlacementState
x y width didDrag
isDrawing
canvasepointerId
isDrawing
currentAction
actionscurrentAction
undoneActionslength
currentAction
pos x y
hitIndex pos
hitIndex
erased actionshitIndex
pendingEraseActionserased
pendingEraseIndiceshitIndex
selectedActionIndex
pending pendingMove
pendingMove
pending
after pendingtarget
pendingbefore after
actions
type AnnotationToolMove
strokeColor
opacity
lineWidth
moveTarget pendingtarget
moveBefore pendingbefore
moveAfter after
undoneActionslength
undoBtn
undoBtndisabled actionslength
redoBtn
redoBtndisabled undoneActionslength
textPlacementState
textEditState
action actions
action
actiontype AnnotationToolEraser actionerasedActions
erased actionerasedActions
indices actionerasedIndices erased actionslength
i erasedlength i i
idx Mathindicesi actionslength
actionsidx erasedi
undoneActionsaction
selectedActionIndex
actiontype AnnotationToolCrop
actioncropFrom
actiontype AnnotationToolMove actionmoveTarget actionmoveBefore
actionmoveTarget actionmoveBefore
textPlacementState
textEditState
action undoneActions
action
actiontype AnnotationToolEraser actionerasedActions
erased actionerasedActions
idx actionserased
idx
actionsidx
actionsaction
selectedActionIndex
actiontype AnnotationToolCrop
actioncropTo
actiontype AnnotationToolMove actionmoveTarget actionmoveAfter
actionmoveTarget actionmoveAfter
pos x y
cropRegion
r cropRegion
handlePx
tol handlePx scale
cx rx rwidth
cy ry rheight
handles name x y
name x rx y ry
name x cx y ry
name x rx rwidth y ry
name x rx rwidth y cy
name x rx rwidth y ry rheight
name x cx y ry rheight
name x rx y ry rheight
name x rx y cy
h handles
Mathposx hx tol Mathposy hy tol
hname
posx rx posx rx rwidth posy ry posy ry rheight
handle
handle
pos x y
cropRegionStart cropDragHandle
dx posx cropDragStartx
dy posy cropDragStarty
start cropRegionStart
cropDragHandle
x Math MathimageWidth startwidth startx dx
y Math MathimageHeight startheight starty dy
cropRegion x y width startwidth height startheight
x y width height start
cropDragHandle
x dx y dy width dx height dy
y dy height dy
y dy width dx height dy
width dx
width dx height dy
height dy
x dx width dx height dy
x dx width dx
x Math MathimageWidth x
y Math MathimageHeight y
width Math MathimageWidth x width
height Math MathimageHeight y height
cropRegion x y width height
r x y width height x y width height
x rwidth rx rwidth rx
y rheight ry rheight ry
width Mathrwidth
height Mathrheight
pos x y width showBoxOutline
editor mainWindowdocument
editor
editor
editorstyleposition
editorstyleleft
editorstyletop
editorstylewidth
editorstyleheight
editorstyleopacity
editorstylepointerEvents
editorstylepadding
editorstyleborder
editorstylemargin
editorstyleresize
editorstyleoverflow
containereditor
textEditState
pos
text
caretIndex
strokeColor activeStrokeColor
fillColor activeFillColor
opacity activeOpacity
fontSize activeFontSize
fontFamily activeFontFamily
width
showBoxOutline
textEditor editor
textEditState textEditor editor
textEditStatetext editorvalue
textEditStatecaretIndex editorselectionStart editorvaluelength
textCaretVisible
editor sync
editor sync
editor sync
editor sync
editor e
e
ekey ectrlKey emetaKey
e
ekey
e
editor
textEditor editor
textEditor editor
editor
editoreditorvaluelength editorvaluelength
textCaretInterval
containertextCaretInterval
textCaretVisible
textCaretInterval container
textEditState
textCaretVisible textCaretVisible
textCaretInterval
containertextCaretInterval
textCaretInterval
textCaretVisible
textEditState
text pos strokeColor fillColor opacity fontFamily fontSize width textEditState
text
actions
type AnnotationToolText
strokeColor
fillColor
opacity
lineWidth
fontSize
fontFamily
text
textPos pos
textWidth width
undoneActionslength
textEditState
textPlacementState
canvastextPlacementStatepointerId
canvastextPlacementStatepointerId
textPlacementState
cropOffsetX imageWidth
startX
Math startX
textEditor
textEditor
textEditState
container
ctx canvaswidth canvasheight
imageElement
ctximageElement imageWidth scale imageHeight scale
ctx
ctxcropOffsetX scale cropOffsetY scale
action actions
action
selectedActionIndex selectedActionIndex actionslength
actionsselectedActionIndex
currentAction
currentAction
textEditState
textPlacementState
ctx
cropMode cropRegion
r cropRegion
dpr canvasdevicePixelRatio
cw canvaswidth dpr
ch canvasheight dpr
rx rx scale
ry ry scale
rw rwidth scale
rh rheight scale
ctx
ctxfillStyle
ctx cw ry
ctx ry rh cw ch ry rh
ctx ry rx rh
ctxrx rw ry cw rx rw rh
ctxstrokeStyle
ctxlineWidth
ctxrx ry rw rh
handleSize
half handleSize
handles x y
x rx y ry
x rx rw y ry
x rx rw y ry
x rx rw y ry rh
x rx rw y ry rh
x rx rw y ry rh
x rx y ry rh
x rx y ry rh
ctxfillStyle
ctxstrokeStyle
ctxlineWidth
h handles
ctxhx half hy half handleSize handleSize
ctxhx half hy half handleSize handleSize
ctx
action DrawAction
actiontype AnnotationToolEraser actiontype AnnotationToolCrop actiontype AnnotationToolMove
ctx
fillColor actionfillColor
ctxglobalAlpha actionopacity
ctxstrokeStyle actionstrokeColor
ctxfillStyle fillColor actionstrokeColor fillColor
ctxlineWidth actionlineWidth scale
ctxlineCap
ctxlineJoin
actiontype
AnnotationToolFreehand
actionpoints actionpointslength
ctx
ctxactionpointsx scale actionpointsy scale
i i actionpointslength i
ctxactionpointsix scale actionpointsiy scale
ctx
AnnotationToolRectangle
actionrect
fillColor
ctx
actionrectx scale
actionrecty scale
actionrectwidth scale
actionrectheight scale
ctx
actionrectx scale
actionrecty scale
actionrectwidth scale
actionrectheight scale
AnnotationToolEllipse
actionellipseRect
r actionellipseRect
cx rx rwidth scale
cy ry rheight scale
rx Mathrwidth scale
ry Mathrheight scale
ctx
ctxcx cy rx ry Math
fillColor
ctx
ctx
AnnotationToolArrow
actionarrowStart actionarrowEnd
actionarrowStartx scale
actionarrowStarty scale
actionarrowEndx scale
actionarrowEndy scale
AnnotationToolText
actiontext actiontextPos
fontSize actionfontSize scale
fontFamily actionfontFamily
width actiontextWidth scale
ctxfont
ctxtextBaseline
fillColor
layout actiontext width fontSize fontFamily
ctx
actiontextPosx scale
actiontextPosy scale fontSize
width
Mathlayoutheight fontSize
ctxfillStyle actionstrokeColor
actiontext actiontextPosx scale actiontextPosy scale width fontSize fontFamily
ctx
textEditState
pos text strokeColor fillColor opacity fontFamily fontSize caretIndex width showBoxOutline textEditState
scaledFontSize fontSize scale
scaledWidth width scale
ctx
ctxglobalAlpha opacity
ctxfillStyle strokeColor
ctxstrokeStyle strokeColor
ctxlineWidth Math scale
ctxfont
ctxtextBaseline
fillColor
layout text scaledWidth scaledFontSize fontFamily
ctxfillStyle fillColor
ctx
posx scale
posy scale scaledFontSize
scaledWidth
Mathlayoutheight scaledFontSize
ctxfillStyle strokeColor
layout text posx scale posy scale scaledWidth scaledFontSize fontFamily
showBoxOutline
ctx
ctxstrokeStyle
ctx
posx scale
posy scale scaledFontSize
scaledWidth
Mathlayoutheight scaledFontSize
ctx
textCaretVisible
caret text caretIndex scaledWidth scaledFontSize fontFamily
caretX posx scale caretx
baselineY posy scale caretbaselineOffsetY
ctx
ctxcaretX baselineY scaledFontSize
ctxcaretX baselineY Math scale
ctx
ctx
color
color
textPlacementState
start current textPlacementState
dx currentx startx
didDrag Mathdx
didDrag
x Mathstartx currentx
width Math MathMathdx x
y starty activeFontSize scale
height activeFontSize scale
ctx
ctx
ctxstrokeStyle
ctxlineWidth Math scale
ctxx scale y width scale height
ctx
ctx
text x baselineY maxWidth fontSize fontFamily width height lineHeight
layout text maxWidth fontSize fontFamily
lineHeight layoutlineHeight
i i layoutlineslength i
line layoutlinesi
ctxlinetext x baselineY i lineHeight
width layoutwidth
height layoutheight
lineHeight
text caretIndex maxWidth fontSize fontFamily x baselineOffsetY
layout text maxWidth fontSize fontFamily
line layoutlinescandidate candidatestartIndex caretIndex layoutlines
safeCaretIndex MathMathcaretIndex linestartIndex lineendIndex
beforeCaret linetext safeCaretIndex linestartIndex
ctx
ctxfont
x ctxbeforeCaretwidth
ctx
x
baselineOffsetY linelineIndex layoutlineHeight
text maxWidth fontSize fontFamily lines text startIndex endIndex lineIndex width height lineHeight
ctx
ctxfont
lineHeight fontSize
lines text startIndex endIndex lineIndex
paragraphs text
globalIndex
lineIndex
maxLineWidth
p p paragraphslength p
paragraph paragraphsp
paragraphStart globalIndex
paragraphEnd paragraphStart paragraphlength
paragraphlength
lines text startIndex paragraphStart endIndex paragraphStart lineIndex
lineIndex
lineStart paragraphStart
lineStart paragraphEnd
bestEnd lineStart
lastWhitespaceBreak
i lineStart i paragraphEnd i
candidate textlineStart i
ctxcandidatewidth maxWidth
bestEnd i
texti
lastWhitespaceBreak i
lineEnd bestEnd
bestEnd paragraphEnd lastWhitespaceBreak lineStart
lineEnd lastWhitespaceBreak
lineEnd lineStart
lineEnd lineStart
rawLineText textlineStart lineEnd
lineText rawLineText
lines text lineText startIndex lineStart endIndex lineEnd lineIndex
maxLineWidth MathmaxLineWidth ctxlineTextwidth
lineIndex
lineStart lineEnd
lineStart paragraphEnd textlineStart
lineStart
globalIndex paragraphEnd
lineslength
lines text startIndex endIndex lineIndex
maxLineWidth
line lines
maxLineWidth MathmaxLineWidth ctxlinetextwidth
ctx
lines
width MathmaxLineWidth maxWidth
height lineslength lineHeight
lineHeight
pos x y
i actionslength i i
pos actionsi
i
pos x y action DrawAction
threshold
actiontype
AnnotationToolFreehand
actionpoints
i i actionpointslength i
pos actionpointsi actionpointsi threshold
AnnotationToolRectangle
actionrect
r actionrect
nx Mathrx rx rwidth
ny Mathry ry rheight
nw Mathrwidth
nh Mathrheight
posx nx threshold posx nx nw threshold
posy ny threshold posy ny nh threshold
AnnotationToolEllipse
actionellipseRect
er actionellipseRect
cx erx erwidth
cy ery erheight
rx Matherwidth
ry Matherheight
rx ry
dx posx cx rx
dy posy cy ry
dist Mathdx dx dy dy
actionfillColor
dist threshold Mathrx ry
normalizedThreshold threshold Mathrx ry
Mathdist normalizedThreshold
AnnotationToolArrow
actionarrowStart actionarrowEnd
pos actionarrowStart actionarrowEnd threshold
AnnotationToolText
actiontext actiontextPos
bounds action
bounds
posx actiontextPosx threshold
posx boundsx boundswidth threshold
posy boundsy threshold
posy boundsy boundsheight threshold
p x y a x y b x y
dx bx ax
dy by ay
lengthSq dx dx dy dy
lengthSq
Mathpx ax py ay
t px ax dx py ay dy lengthSq
t Math Math t
projX ax t dx
projY ay t dy
Mathpx projX py projY
action DrawAction dx dy
actiontype
AnnotationToolFreehand
actionpoints
pt actionpoints
ptx dx
pty dy
AnnotationToolRectangle
actionrect
actionrectx dx
actionrecty dy
AnnotationToolEllipse
actionellipseRect
actionellipseRectx dx
actionellipseRecty dy
AnnotationToolArrow
actionarrowStart
actionarrowStartx dx
actionarrowStarty dy
actionarrowEnd
actionarrowEndx dx
actionarrowEndy dy
AnnotationToolText
actiontextPos
actiontextPosx dx
actiontextPosy dy
action DrawAction
ctx
ctxstrokeStyle
ctxlineWidth
ctx
pad
bounds action
bounds
ctx
boundsx pad scale
boundsy pad scale
boundswidth pad scale
boundsheight pad scale
actiontype AnnotationToolText
handleSize
handleX boundsx boundswidth pad scale
handleY boundsy boundsheight scale
ctxfillStyle
ctxhandleX handleSize handleY handleSize handleSize handleSize
ctx
ctx
pos x y action DrawAction
actiontype AnnotationToolText
bounds action
bounds
threshold
handleX boundsx boundswidth
handleY boundsy boundsheight
Mathposx handleX threshold Mathposy handleY threshold
action DrawAction x y width height
actiontype
AnnotationToolFreehand
actionpoints actionpointslength
minX minY maxX maxY
pt actionpoints
minX MathminX ptx
minY MathminY pty
maxX MathmaxX ptx
maxY MathmaxY pty
x minX y minY width maxX minX height maxY minY
AnnotationToolRectangle
actionrect
r actionrect
x Mathrx rx rwidth
y Mathry ry rheight
width Mathrwidth
height Mathrheight
AnnotationToolEllipse
actionellipseRect
er actionellipseRect
x Matherx erx erwidth
y Mathery ery erheight
width Matherwidth
height Matherheight
AnnotationToolArrow
actionarrowStart actionarrowEnd
minX MathactionarrowStartx actionarrowEndx
minY MathactionarrowStarty actionarrowEndy
maxX MathactionarrowStartx actionarrowEndx
maxY MathactionarrowStarty actionarrowEndy
x minX y minY width maxX minX height maxY minY
AnnotationToolText
actiontext actiontextPos
fontSize actionfontSize
fontFamily actionfontFamily
textWidth actiontextWidth
layout actiontext textWidth fontSize fontFamily
x actiontextPosx
y actiontextPosy fontSize
width textWidth
height layoutheight
fromX fromY toX toY
dx toX fromX
dy toY fromY
length Mathdx dy
length
unitX dx length
unitY dy length
normalX unitY
normalY unitX
lineWidth ctxlineWidth
headLength MathMath scale lineWidth length
headWidth Math scale lineWidth
baseX toX unitX headLength
baseY toY unitY headLength
ctx
ctxfromX fromY
ctxbaseX baseY
ctx
ctx
ctxtoX toY
ctxbaseX normalX headWidth baseY normalY headWidth
ctxbaseX normalX headWidth baseY normalY headWidth
ctx
ctxfillStyle ctxstrokeStyle
ctx
pending pendingZoom
pendingZoom
pending
minScale
maxScale
desiredScale scale pendingfactor
newScale MathminScale MathmaxScale desiredScale
newScale scale
halfImgW imageWidth scale
halfImgH imageHeight scale
anchorCx panX MathhalfImgW MathhalfImgW pendingcx panX
anchorCy panY MathhalfImgH MathhalfImgH pendingcy panY
r newScale scale
panX anchorCx r panX r
panY anchorCy r panY r
scale newScale
hasUserZoomed
newScale minScale
panX
panY
canvasstyletransform
container canvasparentElement
container imageWidth imageHeight
maxWidth Math containerclientWidth
maxHeight Math containerclientHeight
MathmaxWidth imageWidth maxHeight imageHeight
container canvasparentElement
container
imgW imageWidth scale
imgH imageHeight scale
cW containerclientWidth
cH containerclientHeight
maxPanX MathcW imgW
maxPanY MathcH imgH
panX MathmaxPanX MathmaxPanX panX
panY MathmaxPanY MathmaxPanY panY
finalCanvas mainWindowdocument
finalCanvaswidth imageWidth
finalCanvasheight imageHeight
ctx finalCanvas
imageElement
ctximageElement imageWidth imageHeight
savedScale scale
scale
savedCtx ctx
ctx ctx
offX currentCropx
offY currentCropy
ctx
ctxoffX offY
action actions
action
ctx
ctx savedCtx
scale savedScale
finalCanvas
pendingZoomRaf
canvaspendingZoomRaf
pendingZoomRaf
pendingZoom
container
toolOptionsDisposables
disposables
_onDidSave
_onDidCancel