-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I've got a div with the following data-bind set up (outer tag redacted because I couldn't get it to show with markdown without a fight):
'''
data-bind="dialog: {resizable: true, title: windowTitle, width: width, height: height, position: position }"
'''
I have a number of the following javascript objects bound to the documentWindow class div shown above:
'''
var windowManager = function (options) {
var self = this;
var data = $.extend({
width: 250,
height: 250,
documentName: '',
documentType: '',
position: {
my: 'left top',
at: 'left-top',
of: '#dashboard'
}
}, options);
self.width = ko.observable(data.width);
self.height = ko.observable(data.height);
self.documentName = ko.observable(data.documentName);
self.documentType = ko.observable(data.documentType);
self.isOpen = ko.observable(data.isOpen);
self.windowTitle = ko.computed(function() {
return self.documentName() + ' - ' + self.documentType();
});
'''
Now, I can verify that these properties are being bound. I can see the window title, for instance, and the width and height is set appropriately when binding first occurs. After that, moving the dialogs and/or resizing them is not reflected in the bound objects. Any suggestions?
Metadata
Metadata
Assignees
Labels
No labels