Remove the deprecated AnnotationStorage.getOrCreateValue-method (PR 12759 follow-up)
				
					
				
			While this method has only been deprecated in one releases now, the `AnnotationStorage`-functionality is new enough that third-party implementations hopefully don't rely heavily on it just yet. (And removing this quickly should help reduce the likelihood that someone starts using it.)
This commit is contained in:
		
							parent
							
								
									92ec10bfca
								
							
						
					
					
						commit
						4e81e0e14f
					
				| @ -13,7 +13,6 @@ | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| import { deprecated } from "./display_utils.js"; | ||||
| import { objectFromMap } from "../shared/util.js"; | ||||
| 
 | ||||
| /** | ||||
| @ -27,7 +26,7 @@ class AnnotationStorage { | ||||
|     // Callbacks to signal when the modification state is set or reset.
 | ||||
|     // This is used by the viewer to only bind on `beforeunload` if forms
 | ||||
|     // are actually edited to prevent doing so unconditionally since that
 | ||||
|     // can have undesirable efffects.
 | ||||
|     // can have undesirable effects.
 | ||||
|     this.onSetModified = null; | ||||
|     this.onResetModified = null; | ||||
|   } | ||||
| @ -46,19 +45,6 @@ class AnnotationStorage { | ||||
|     return obj !== undefined ? obj : defaultValue; | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|    * @deprecated | ||||
|    */ | ||||
|   getOrCreateValue(key, defaultValue) { | ||||
|     deprecated("Use getValue instead."); | ||||
|     if (this._storage.has(key)) { | ||||
|       return this._storage.get(key); | ||||
|     } | ||||
| 
 | ||||
|     this._storage.set(key, defaultValue); | ||||
|     return defaultValue; | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|    * Set the value for a given key | ||||
|    * | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user