예제 #1
0
        public BpmnSynchronizerTests()
        {
            _contractManagerMock     = new Mock <IContractManager>();
            _jsRuntimeMock           = new Mock <IJSRuntime>();
            _processModelManagerMock = new Mock <IProcessModelManager>();
            _editElementServiceMock  = new Mock <IEditElementService>();

            _processModelManagerMock.Setup(m => m.TranslateBpmnProcessId(It.IsAny <string>())).Returns <string>(id => $"{id}-translated");
            _eventHandler     = new BpmnEventListener(_jsRuntimeMock.Object, _processModelManagerMock.Object);
            _bpmnSynchronizer = new BpmnSynchronizer(_eventHandler, _processModelManagerMock.Object,
                                                     _contractManagerMock.Object, _editElementServiceMock.Object, _jsRuntimeMock.Object);

            _bpmnSynchronizer.InitializeOrRestoreBpmnEditor("");
        }
예제 #2
0
        protected override void OnAfterRender(bool firstRender)
        {
            if (firstRender)
            {
                BpmnSynchronizer.InitializeOrRestoreBpmnEditor("canvas");
            }

            if (_restoreBpmnElement)
            {
                BpmnSynchronizer.InitializeOrRestoreBpmnEditor("canvas");
                _restoreBpmnElement = false;
            }

            if (ShowDetailBar)
            {
                InitializeSplitGutter();
            }
        }