Skip to content

dialog properties don't seem to be getting updated #34

@williamwgant

Description

@williamwgant

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions