/* Copyright 2021-present The maxGraph project Contributors Copyright (c) 2006-2013, JGraph Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Menustyle This example demonstrates using CSS to style the mxPopupMenu. */ import { Client, CellOverlay, CellRenderer, EventObject, ImageBox, InternalEvent, InternalMouseEvent, RubberBandHandler, Graph, PopupMenuHandler, CellEditorHandler, TooltipHandler, SelectionCellsHandler, ConnectionHandler, SelectionHandler, PanningHandler, } from '@maxgraph/core'; import { globalTypes, globalValues } from './shared/args.js'; // style required by RubberBand import '@maxgraph/core/css/common.css'; const CSS_TEMPLATE = ` body div.mxPopupMenu { -webkit-box-shadow: 3px 3px 6px #C0C0C0; -moz-box-shadow: 3px 3px 6px #C0C0C0; box-shadow: 3px 3px 6px #C0C0C0; background: white; position: absolute; border: 3px solid #e7e7e7; padding: 3px; } body table.mxPopupMenu { border-collapse: collapse; margin: 0px; } body tr.mxPopupMenuItem { color: black; cursor: default; } body td.mxPopupMenuItem { padding: 6px 60px 6px 30px; font-family: Arial; font-size: 10pt; } body td.mxPopupMenuIcon { background-color: white; padding: 0px; } body tr.mxPopupMenuItemHover { background-color: #eeeeee; color: black; } table.mxPopupMenu hr { border-top: solid 1px #cccccc; } table.mxPopupMenu tr { font-size: 4pt; } `; // TODO apply this settings to the container used by the Graph const HTML_TEMPLATE = `