* [WIP] Add names next to pointers
This implements the rendering and messaging across. Still need to do the UI to set the name.
Also, not really sure what's the best place to send the name and store it.
* Add randomized names
Co-authored-by: Christopher Chedeau <vjeux@fb.com>
My original hack to put the scale when we create the canvas element doesn't make much sense. It should be done when we are rendering the scene. I moved it there in this PR.
The rest was all about forwarding the scale to where it's needed.
* Stop using getTransform
Fixes#861
The original motivation behind this is to make it work with Firefox. But it also helped make the code more intentional.
Test Plan:
- Create one square, select it, zoom in repeatedly, make sure that it zooms centered in the screen and everything looks good
- Scroll at various zoom levels, things look good
- Export a small scene at 1x and 3x, make sure the background is properly set and look good
* fix selection element
I'm using the client id as a random number to index on the color array. So far it's been working better than using a sequential increment as the colors in the array are sorted by proximity. Also, it has the advantage that everyone in the room will see the same color for the same person.
* support ToolIcon className and fix label padding
* factor some ExportDialog classes out to Modal
* initial RoomDialog prototype
* change label for another-session button
* remove unused css
* add color comments
* Move the collaboration button to the main menu, add support for mobile
* remove button for creating another session
* add locks
* Fix alignment issue
* Reorder button
* reuse current scene for collab session
* keep collaboration state on restore
Co-authored-by: Jed Fox <git@twopointzero.us>
* Enable collaborative syncing for elements
* Don't fall back to local storage if using a room, as that is confusing
* Use remote socket server
* Send updates to new users when they join
* ~
* add mouse tracking
* enable collaboration, rooms, and mouse tracking
* fix syncing bugs and add a button to start syncing mid session
* enable collaboration, rooms, and mouse tracking
* fix syncing bugs and add a button to start syncing mid session
* Add Live button and app state to support tracking collaborator counts
* Enable collaborative syncing for elements
* add mouse tracking
* enable collaboration, rooms, and mouse tracking
* fix syncing bugs and add a button to start syncing mid session
* fix syncing bugs and add a button to start syncing mid session
* Add Live button and app state to support tracking collaborator counts
* prettier
* Fix bug with remote pointers not changing on scroll
* Enable collaborative syncing for elements
* add mouse tracking
* enable collaboration, rooms, and mouse tracking
* fix syncing bugs and add a button to start syncing mid session
* enable collaboration, rooms, and mouse tracking
* fix syncing bugs and add a button to start syncing mid session
* Add Live button and app state to support tracking collaborator counts
* enable collaboration, rooms, and mouse tracking
* fix syncing bugs and add a button to start syncing mid session
* fix syncing bugs and add a button to start syncing mid session
* Fix bug with remote pointers not changing on scroll
* remove UI for collaboration
* remove link
* clean up lingering unused UI
* set random IV passed per encrypted message, reduce room id length, refactored socket broadcasting API, rename room_id to room, removed throttling of pointer movement
* fix package.json conflict
* Get rid of isSelected, canvas, canvasZoom, canvasOffsetX and canvasOffsetY on ExcalidrawElement.
* Fix most unit tests. Fix cmd a. Fix alt drag
* Focus on paste
* shift select should include previously selected items
* Fix last test
* Move this.shape out of ExcalidrawElement and into a WeakMap
* Initial factoring out of parts of the LayerUI component
2360 → 2224 LOC
* Create a Section component
* Break up src/index.tsx
* Refactor actions to reduce duplication, fix CSS
Also consolidate icons
* Move scene/data.ts to its own directory
* Fix accidental reverts, banish further single-character variables
* ACTIVE_ELEM_COLOR → ACTIVE_ELEMENT_COLOR
* Further refactoring the icons file
* Log all errors
* Pointer Event polyfill to make the tests work
* add test hooks & fix tests
Co-authored-by: dwelle <luzar.david@gmail.com>
* Make Undo & Redo and the menu buttons into actions; add undo/redo buttons
* Create variables for the ToolIcon colors
* Darken the menu buttons when they’re active
* Put the more intensive test in `perform`
* Fix & restyle hint viewer
* Add pinch zoom for macOS Safari
* Chrome/Firefox trackpad pinch zoom
* openedMenu → openMenu
* needsShapeEditor.ts → showSelectedShapeActions.ts
* Call showSelectedShapeActions
* feat: add reset zoom button
Add zoom reset button.
Button is shown only when zoom scale is different from 1
* change reset zoom icon
* always show zoom reset
* fix typo
* Disable text selection
* Set content-editable=plaintext-only to disable Touch Bar formatting buttons
* Enlarge resize handle tap targets for pen/touch
* Make the lock button a button in mobile mode
* Use icons instead of Unicode characters; add an alternate toolbar for creating multipoint lines
* Allow buttons to hide themselves
* Fix heuristic for showing shape actions
* Refactor icons
* Fix label for edit button
* Switch edit button icon
* Remove lock button on mobile
* Add language selector on mobile
* Fix showing edit button on mobile
* Fix showing edit button on mobile, part 2
* Fix handle touch regions
* Fix scroll-back button position
* Allow using the text tool on a text object to start editing it
* Fix deletion of last point in line