another fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-05-27 23:04:15 +03:00
parent 9108aa6948
commit 104db56b48
3 changed files with 12 additions and 28 deletions

View File

@ -61,7 +61,8 @@ function(attr, states, a, b){
// Root ImageGrid.viewer object constructor... // Root ImageGrid.viewer object constructor...
// //
var ImageGrid = var ImageGrid =
module.ImageGrid = object.makeConstructor('ImageGrid', actions.MetaActions) module.ImageGrid =
object.makeConstructor('ImageGrid', Object.create(actions.MetaActions))
// Root ImageGrid feature set.... // Root ImageGrid feature set....
var ImageGridFeatures = var ImageGridFeatures =

View File

@ -104,6 +104,10 @@ define(function(require){ var module = {}
// - easy refactoring without touching the client code // - easy refactoring without touching the client code
// //
// //
// NOTE: this sets the proto's .constructor attribute, this rendering it
// not reusable, to use the same prototype for multiple objects clone
// it via. Object.create(..) or copy it...
//
// XXX might be a good idea to be able to make an instance without // XXX might be a good idea to be able to make an instance without
// initializing it... // initializing it...
// ...mainly for inheritance. // ...mainly for inheritance.
@ -115,8 +119,6 @@ function makeConstructor(name, a, b){
var proto = b == null ? a : b var proto = b == null ? a : b
var cls_proto = b == null ? b : a var cls_proto = b == null ? b : a
proto = Object.create(proto)
var _constructor = function Constructor(){ var _constructor = function Constructor(){
/* /*
// XXX BUG: if the constructor is called from it's instance this will // XXX BUG: if the constructor is called from it's instance this will

View File

@ -2195,25 +2195,6 @@ var BrowserPrototype = {
} }
/*
// nw.js copy/paste handling...
//
// XXX not sure if we actually need these...
if(NW){
// override copy...
BrowserPrototype.keyboard.General.C = {
ctrl: 'copy!',
}
BrowserPrototype.keyboard.General.X = 'C'
// override paste...
BrowserPrototype.keyboard.General.V = {
ctrl: 'paste!',
}
}
*/
var Browser = var Browser =
module.Browser = module.Browser =
object.makeConstructor('Browser', object.makeConstructor('Browser',
@ -2228,7 +2209,7 @@ Browser.prototype.__proto__ = widget.Widget.prototype
/*********************************************************************/ /*********************************************************************/
var ListerPrototype = Object.create(BrowserPrototype) var ListerPrototype = Object.create(Browser.prototype)
ListerPrototype.options = { ListerPrototype.options = {
pathPrefix: '', pathPrefix: '',
fullPathEdit: false, fullPathEdit: false,
@ -2244,7 +2225,7 @@ ListerPrototype.options = {
// ...inheriting might pose problems with deleting values reverting // ...inheriting might pose problems with deleting values reverting
// them to default instead of nulling them and mutable options might // them to default instead of nulling them and mutable options might
// get overwritten... // get overwritten...
ListerPrototype.options.__proto__ = BrowserPrototype.options ListerPrototype.options.__proto__ = Browser.prototype.options
var Lister = var Lister =
module.Lister = module.Lister =
@ -2287,7 +2268,7 @@ module.makeLister = function(elem, lister, options){
// disable this feature set it to false|null. // disable this feature set it to false|null.
// //
// NOTE: this essentially a different default configuration of Browser... // NOTE: this essentially a different default configuration of Browser...
var ListPrototype = Object.create(BrowserPrototype) var ListPrototype = Object.create(Browser.prototype)
ListPrototype.options = { ListPrototype.options = {
pathPrefix: '', pathPrefix: '',
@ -2354,7 +2335,7 @@ ListPrototype.options = {
// ...inheriting might pose problems with deleting values reverting // ...inheriting might pose problems with deleting values reverting
// them to default instead of nulling them and mutable options might // them to default instead of nulling them and mutable options might
// get overwritten... // get overwritten...
ListPrototype.options.__proto__ = BrowserPrototype.options ListPrototype.options.__proto__ = Browser.prototype.options
var List = var List =
module.List = module.List =
@ -2463,7 +2444,7 @@ module.makeList = makeBrowserMaker(List)
// NOTE: currently only trailing '*' are supported. // NOTE: currently only trailing '*' are supported.
// //
// XXX add support for '*' and '**' glob patterns... // XXX add support for '*' and '**' glob patterns...
var PathListPrototype = Object.create(BrowserPrototype) var PathListPrototype = Object.create(Browser.prototype)
PathListPrototype.options = { PathListPrototype.options = {
fullPathEdit: true, fullPathEdit: true,
@ -2597,7 +2578,7 @@ PathListPrototype.options = {
// ...inheriting might pose problems with deleting values reverting // ...inheriting might pose problems with deleting values reverting
// them to default instead of nulling them and mutable options might // them to default instead of nulling them and mutable options might
// get overwritten... // get overwritten...
PathListPrototype.options.__proto__ = BrowserPrototype.options PathListPrototype.options.__proto__ = Browser.prototype.options
var PathList = var PathList =
module.PathList = module.PathList =