mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	an experiment with .location editor...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									62ca9e1d1d
								
							
						
					
					
						commit
						de6ead22a8
					
				| @ -9,6 +9,7 @@ define(function(require){ var module = {} | |||||||
| //var DEBUG = DEBUG != null ? DEBUG : true
 | //var DEBUG = DEBUG != null ? DEBUG : true
 | ||||||
| 
 | 
 | ||||||
| var util = require('lib/util') | var util = require('lib/util') | ||||||
|  | var object = require('lib/object') | ||||||
| 
 | 
 | ||||||
| var actions = require('lib/actions') | var actions = require('lib/actions') | ||||||
| var features = require('lib/features') | var features = require('lib/features') | ||||||
| @ -17,6 +18,35 @@ var core = require('features/core') | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /*********************************************************************/ | ||||||
|  | // XXX experimental...
 | ||||||
|  | 
 | ||||||
|  | // XXX need the other .location stuff to be visible/accessible...
 | ||||||
|  | // 		...now this only shows path...
 | ||||||
|  | var LocationProto = { | ||||||
|  | 	get path(){ | ||||||
|  | 		return this.__actions.__location.path | ||||||
|  | 	}, | ||||||
|  | 	set path(value){ | ||||||
|  | 		this.__actions.location = value | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
|  | 	 | ||||||
|  | 	__init__: function(actions){ | ||||||
|  | 		this.__actions = actions | ||||||
|  | 
 | ||||||
|  | 		// XXX this does not work...
 | ||||||
|  | 		// 		...the oother way around seems best:
 | ||||||
|  | 		// 			actions.__location.__proto__ = this
 | ||||||
|  | 		//this.__proto__ = actions.__location
 | ||||||
|  | 	}, | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | var Location = object.makeConstructor('Location', LocationProto) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /*********************************************************************/ | /*********************************************************************/ | ||||||
| // XXX add url scheme support...
 | // XXX add url scheme support...
 | ||||||
| // 		<method>://<path>#<current>?<other>
 | // 		<method>://<path>#<current>?<other>
 | ||||||
| @ -62,6 +92,7 @@ var LocationActions = actions.Actions({ | |||||||
| 		this.__location.current = this.current | 		this.__location.current = this.current | ||||||
| 
 | 
 | ||||||
| 		return this.__location | 		return this.__location | ||||||
|  | 		//return Location(this) 
 | ||||||
| 	}, | 	}, | ||||||
| 	// NOTE: this is a shorthand for .loadLocation(..)
 | 	// NOTE: this is a shorthand for .loadLocation(..)
 | ||||||
| 	// NOTE: the method is needed to enable us to get the action return
 | 	// NOTE: the method is needed to enable us to get the action return
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user