mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	floating button container WIP
This commit is contained in:
		
							parent
							
								
									b8a89ee52a
								
							
						
					
					
						commit
						5444cc2009
					
				
							
								
								
									
										58
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										58
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -29,10 +29,10 @@ | ||||
|         "electron-window-state": "5.0.3", | ||||
|         "express": "4.18.1", | ||||
|         "express-partial-content": "1.0.2", | ||||
|         "express-rate-limit": "6.4.0", | ||||
|         "express-rate-limit": "6.5.1", | ||||
|         "express-session": "1.17.3", | ||||
|         "fs-extra": "10.1.0", | ||||
|         "helmet": "5.1.0", | ||||
|         "helmet": "5.1.1", | ||||
|         "html": "1.0.0", | ||||
|         "html2plaintext": "2.1.4", | ||||
|         "http-proxy-agent": "5.0.0", | ||||
| @ -79,7 +79,7 @@ | ||||
|         "electron-packager": "15.5.1", | ||||
|         "electron-rebuild": "3.2.8", | ||||
|         "esm": "3.2.25", | ||||
|         "jasmine": "4.2.1", | ||||
|         "jasmine": "4.3.0", | ||||
|         "jsdoc": "3.6.11", | ||||
|         "lorem-ipsum": "2.0.8", | ||||
|         "rcedit": "3.0.1", | ||||
| @ -4921,9 +4921,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/express-rate-limit": { | ||||
|       "version": "6.4.0", | ||||
|       "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.4.0.tgz", | ||||
|       "integrity": "sha512-lxQRZI4gi3qAWTf0/Uqsyugsz57h8bd7QyllXBgJvd6DJKokzW7C5DTaNvwzvAQzwHGFaItybfYGhC8gpu0V2A==", | ||||
|       "version": "6.5.1", | ||||
|       "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.5.1.tgz", | ||||
|       "integrity": "sha512-pxO6ioBLd3i8IHL+RmJtL4noYzte5fugoMdaDabtU4hcg53+x0QkTwfPtM7vWD0YUaXQgNj9NRdzmps+CHEHlA==", | ||||
|       "engines": { | ||||
|         "node": ">= 12.9.0" | ||||
|       }, | ||||
| @ -5834,9 +5834,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/helmet": { | ||||
|       "version": "5.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.0.tgz", | ||||
|       "integrity": "sha512-klsunXs8rgNSZoaUrNeuCiWUxyc+wzucnEnFejUg3/A+CaF589k9qepLZZ1Jehnzig7YbD4hEuscGXuBY3fq+g==", | ||||
|       "version": "5.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", | ||||
|       "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==", | ||||
|       "engines": { | ||||
|         "node": ">=12.0.0" | ||||
|       } | ||||
| @ -6469,22 +6469,22 @@ | ||||
|       "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" | ||||
|     }, | ||||
|     "node_modules/jasmine": { | ||||
|       "version": "4.2.1", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.2.1.tgz", | ||||
|       "integrity": "sha512-LNZEKcScnjPRj5J92I1P515bxTvaHMRAERTyCoaGnWr87eOT6zv+b3M+kxKdH/06Gz4TnnXyHbXLiPtMHZ0ncw==", | ||||
|       "version": "4.3.0", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.3.0.tgz", | ||||
|       "integrity": "sha512-ieBmwkd8L1DXnvSnxx7tecXgA0JDgMXPAwBcqM4lLPedJeI9hTHuWifPynTC+dLe4Y+GkSPSlbqqrmYIgGzYUw==", | ||||
|       "dev": true, | ||||
|       "dependencies": { | ||||
|         "glob": "^7.1.6", | ||||
|         "jasmine-core": "^4.2.0" | ||||
|         "jasmine-core": "^4.3.0" | ||||
|       }, | ||||
|       "bin": { | ||||
|         "jasmine": "bin/jasmine.js" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/jasmine-core": { | ||||
|       "version": "4.2.0", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.2.0.tgz", | ||||
|       "integrity": "sha512-OcFpBrIhnbmb9wfI8cqPSJ50pv3Wg4/NSgoZIqHzIwO/2a9qivJWzv8hUvaREIMYYJBas6AvfXATFdVuzzCqVw==", | ||||
|       "version": "4.3.0", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.3.0.tgz", | ||||
|       "integrity": "sha512-qybtBUesniQdW6n+QIHMng2vDOHscIC/dEXjW+JzO9+LoAZMb03RCUC5xFOv/btSKPm1xL42fn+RjlU4oB42Lg==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "node_modules/jest-worker": { | ||||
| @ -14759,9 +14759,9 @@ | ||||
|       "requires": {} | ||||
|     }, | ||||
|     "express-rate-limit": { | ||||
|       "version": "6.4.0", | ||||
|       "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.4.0.tgz", | ||||
|       "integrity": "sha512-lxQRZI4gi3qAWTf0/Uqsyugsz57h8bd7QyllXBgJvd6DJKokzW7C5DTaNvwzvAQzwHGFaItybfYGhC8gpu0V2A==", | ||||
|       "version": "6.5.1", | ||||
|       "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.5.1.tgz", | ||||
|       "integrity": "sha512-pxO6ioBLd3i8IHL+RmJtL4noYzte5fugoMdaDabtU4hcg53+x0QkTwfPtM7vWD0YUaXQgNj9NRdzmps+CHEHlA==", | ||||
|       "requires": {} | ||||
|     }, | ||||
|     "express-session": { | ||||
| @ -15436,9 +15436,9 @@ | ||||
|       "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" | ||||
|     }, | ||||
|     "helmet": { | ||||
|       "version": "5.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.0.tgz", | ||||
|       "integrity": "sha512-klsunXs8rgNSZoaUrNeuCiWUxyc+wzucnEnFejUg3/A+CaF589k9qepLZZ1Jehnzig7YbD4hEuscGXuBY3fq+g==" | ||||
|       "version": "5.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", | ||||
|       "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==" | ||||
|     }, | ||||
|     "hosted-git-info": { | ||||
|       "version": "2.8.9", | ||||
| @ -15904,19 +15904,19 @@ | ||||
|       } | ||||
|     }, | ||||
|     "jasmine": { | ||||
|       "version": "4.2.1", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.2.1.tgz", | ||||
|       "integrity": "sha512-LNZEKcScnjPRj5J92I1P515bxTvaHMRAERTyCoaGnWr87eOT6zv+b3M+kxKdH/06Gz4TnnXyHbXLiPtMHZ0ncw==", | ||||
|       "version": "4.3.0", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.3.0.tgz", | ||||
|       "integrity": "sha512-ieBmwkd8L1DXnvSnxx7tecXgA0JDgMXPAwBcqM4lLPedJeI9hTHuWifPynTC+dLe4Y+GkSPSlbqqrmYIgGzYUw==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "glob": "^7.1.6", | ||||
|         "jasmine-core": "^4.2.0" | ||||
|         "jasmine-core": "^4.3.0" | ||||
|       } | ||||
|     }, | ||||
|     "jasmine-core": { | ||||
|       "version": "4.2.0", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.2.0.tgz", | ||||
|       "integrity": "sha512-OcFpBrIhnbmb9wfI8cqPSJ50pv3Wg4/NSgoZIqHzIwO/2a9qivJWzv8hUvaREIMYYJBas6AvfXATFdVuzzCqVw==", | ||||
|       "version": "4.3.0", | ||||
|       "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.3.0.tgz", | ||||
|       "integrity": "sha512-qybtBUesniQdW6n+QIHMng2vDOHscIC/dEXjW+JzO9+LoAZMb03RCUC5xFOv/btSKPm1xL42fn+RjlU4oB42Lg==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "jest-worker": { | ||||
|  | ||||
| @ -44,10 +44,10 @@ | ||||
|     "electron-window-state": "5.0.3", | ||||
|     "express": "4.18.1", | ||||
|     "express-partial-content": "1.0.2", | ||||
|     "express-rate-limit": "6.4.0", | ||||
|     "express-rate-limit": "6.5.1", | ||||
|     "express-session": "1.17.3", | ||||
|     "fs-extra": "10.1.0", | ||||
|     "helmet": "5.1.0", | ||||
|     "helmet": "5.1.1", | ||||
|     "html": "1.0.0", | ||||
|     "html2plaintext": "2.1.4", | ||||
|     "http-proxy-agent": "5.0.0", | ||||
| @ -91,7 +91,7 @@ | ||||
|     "electron-packager": "15.5.1", | ||||
|     "electron-rebuild": "3.2.8", | ||||
|     "esm": "3.2.25", | ||||
|     "jasmine": "4.2.1", | ||||
|     "jasmine": "4.3.0", | ||||
|     "jsdoc": "3.6.11", | ||||
|     "lorem-ipsum": "2.0.8", | ||||
|     "rcedit": "3.0.1", | ||||
|  | ||||
| @ -15,6 +15,11 @@ const TPL = ` | ||||
|             flex-direction: row; | ||||
|             z-index: 100; | ||||
|         } | ||||
|          | ||||
|         .floating-buttons .floating-button { | ||||
|             font-size: 130%; | ||||
|             padding: 5px 10px 4px 10px; | ||||
|         } | ||||
|     </style> | ||||
|      | ||||
|     <div class="floating-buttons-children"></div> | ||||
|  | ||||
| @ -5,25 +5,21 @@ import toastService from "../../services/toast.js"; | ||||
| 
 | ||||
| const TPL = ` | ||||
| <div> | ||||
|     <button class="relation-map-create-child-note btn btn-sm floating-button no-print" type="button" | ||||
|                 title="Create new child note and add it into this relation map"> | ||||
|         <span class="bx bx-folder-plus"></span> | ||||
|      | ||||
|         Create child note | ||||
|     </button> | ||||
|     <button type="button" | ||||
|             class="relation-map-create-child-note floating-button btn bx bx-folder-plus no-print" | ||||
|             title="Create new child note and add it into this relation map"></button> | ||||
|      | ||||
|     <button type="button" | ||||
|             class="relation-map-reset-pan-zoom btn icon-button floating-button bx bx-crop no-print" | ||||
|             title="Reset pan & zoom to initial coordinates and magnification" | ||||
|             style="right: 100px;"></button> | ||||
|             class="relation-map-reset-pan-zoom floating-button btn bx bx-crop no-print" | ||||
|             title="Reset pan & zoom to initial coordinates and magnification"></button> | ||||
|      | ||||
|     <div class="btn-group floating-button no-print" style="right: 10px;"> | ||||
|     <div class="btn-group no-print"> | ||||
|         <button type="button" | ||||
|                 class="relation-map-zoom-in btn icon-button bx bx-zoom-in" | ||||
|                 class="relation-map-zoom-in floating-button btn bx bx-zoom-in" | ||||
|                 title="Zoom In"></button> | ||||
|      | ||||
|         <button type="button" | ||||
|                 class="relation-map-zoom-out btn icon-button bx bx-zoom-out" | ||||
|                 class="relation-map-zoom-out floating-button btn bx bx-zoom-out" | ||||
|                 title="Zoom Out"></button> | ||||
|     </div> | ||||
| </div>`; | ||||
| @ -47,5 +43,6 @@ export default class RelationMapButtons extends NoteContextAwareWidget { | ||||
| 
 | ||||
|         this.$zoomInButton.on('click', () => this.triggerEvent('relationMapResetZoomIn', {ntxId: this.ntxId})); | ||||
|         this.$zoomOutButton.on('click', () => this.triggerEvent('relationMapResetZoomOut', {ntxId: this.ntxId})); | ||||
|         this.contentSized(); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -23,7 +23,6 @@ const TPL = ` | ||||
|             display: flex; | ||||
|             justify-content: space-between; | ||||
|             align-items: center; | ||||
|             z-index: 10; | ||||
|         } | ||||
|          | ||||
|         .backlinks-count { | ||||
|  | ||||
| @ -25,9 +25,9 @@ const TPL = `<div class="note-map-widget" style="position: relative;"> | ||||
|         } | ||||
|     </style> | ||||
|      | ||||
|     <div class="btn-group btn-group-sm map-type-switcher floating-button" role="group"> | ||||
|       <button type="button" class="btn icon-button bx bx-network-chart" title="Link Map" data-type="link"></button> | ||||
|       <button type="button" class="btn icon-button bx bx-sitemap" title="Tree map" data-type="tree"></button> | ||||
|     <div class="btn-group btn-group-sm map-type-switcher" role="group"> | ||||
|       <button type="button" class="btn bx bx-network-chart" title="Link Map" data-type="link"></button> | ||||
|       <button type="button" class="btn bx bx-sitemap" title="Tree map" data-type="tree"></button> | ||||
|     </div> | ||||
| 
 | ||||
|     <div class="style-resolver"></div> | ||||
|  | ||||
| @ -602,11 +602,6 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href | ||||
|     padding: 0.7rem 1rem 0 1rem !important; /* make modal header padding slightly smaller */ | ||||
| } | ||||
| 
 | ||||
| .floating-button { | ||||
|     position: absolute !important; | ||||
|     z-index: 100; | ||||
| } | ||||
| 
 | ||||
| #toast-container { | ||||
|     position: absolute; | ||||
|     width: 100%; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam