Custom Style Change Event

Event that fires when any user changes UI representation of an entity.

Event name

custom-style-change

Request

  • Subscribe

  • Unsubscribe

cn.emit('add-topics', 'custom-style-change')
cn.emit('remove-topics', 'custom-style-change')

Response

Response contains the following fields:

Field Type Description

entityType

Integer

Type of an updated entity. 1 is an Object, 2 is a Link.

id

String

ID of an entity, whose representation was changed.

user

Object

Information about the user who changed the representation.

user.login

String

Username of a user who changed the representation.

custom_style

CustomStyle

Updated representation of an entity.

Example

Request

const comet = require('socket.io-client');

// Comet settings
const COMET_CONNECT_TIMEOUT = 5000;
const sessionId = "..."
const conf = {
    cometHost: 'https://example.com',
    cometPort: '1234',
};

const url = `${conf.cometHost}` + (conf.cometPort ? `:${conf.cometPort}` : '');
const cn = comet.connect(url, {
    query: { forceNew: true, sessionId },
    timeout: COMET_CONNECT_TIMEOUT,
});

cn.emit('add-topics', 'custom-style-change');

cn.on('custom-style-change', msg => {
      console.log(msg);
});

Response

{
    "entityType":1,
    "id":"62a2fbd19896a55459d85eb1",
    "user":{
        "login":"example.user"
    },
    "custom_style":{
        "zIndex":38,
        "left":"112px",
        "top":"35px",
        "width":"220px",
        "height":"120px"
    }
}